Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 21 Next »


1. Request Refund

1) Purpose

  • 채널에서 구매자에 의해 발생한 주문 취소 건에 대한 환불을 AX Cloud 에 요청합니다.

  • 채널에서 미리 정해진 환불 규정에 따라 AX Cloud로 단방향 요청을 합니다.

2) Detail

  • 채널에서 정해진 환불 규정에 따라 진행된 환불 정보를 포함하여 요청합니다.

  • 유효한 API Key를 Request Header에 정해진 형식으로 입력해야만 호출 가능합니다.

2. API Spec

1) Request

Endpoint

product environment: https://prod.ax-cloud.com/v1/channel/orders/tour/{ax_order_code}/tickets/{ticket_code}/refund

Method

POST

Description

채널에서 특정 주문의 환불이 진행된 건에 대해 AX Cloud와 동기화 합니다.

Content-Type

application/json

Headers > Authorization

Token {api_key}

2) Body Parameter

Name

Required

Type

Description

refund_price

O

String

  • 채널에서 구매자에게 환불해준 가격

channel_canceled_at

O

Datetime

  • 채널에서 주문의 취소가 발생한 일시

channel_refunded_at

O

Datetime

  • 채널에서 구매자에게 환불이 완료된 일시

policy

O

Object

  • 채널의 환불 규정

  • 예시

    • {"0": “1", # Use date 1일 전부터는 환불 불가
      "50": "3", # Use date 3일 전부터는 50% 환불
      "100": “7"} # Use date 7일 전부터는 100% 환불

3) Response

Name

Type

Description

status_code

Integer

정상 처리 시 200

 Status Code : 200 Response:
{
}

4) Error Spec

 Status Code : 403 Cause: 유효하지 않은 API Key
{'message': '이 작업을 수행할 권한(permission)이 없습니다.'}
 Status Code : 404 Cause: 유효하지 않은 order_code, ticket_code
{'message': '찾을 수 없습니다.'}

3. Request Example

1) CURL

curl -X 'PATCH' \
  'https://prod.ax-cloud.com/v1/channel/orders/tour/b9872ed4-12c5-4fb5-ae18-4f39b11ee912/tickets/915c1218-f41c-492b-bb0b-96177ff4d2ee/refunds' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{ \
  "refund_price": "5000",
  "channel_canceled_datetime": "2021-01-20 21:13:13",
  "channel_refunded_datetime": "2021-01-20 23:24:29",
  "policy": {"0": "1", "50": "3",  "100": “7"}
}'

  • No labels