Table of Contents |
---|
...
1. Request Refund
1) Purpose
채널에서 발생한 환불에 대해 AX Cloud 에 요청합니다.
미리 정해진 환불 규정에 따라 요청할 수 있습니다.
2) Detail
채널에서 정해진 환불 규정에 따라 진행된 환불 정보를 포함하여 요청합니다.
고유한 채널 코드와 유효한 API Key를 Request Header에 정해진 형식으로 입력해야만 호출 가능합니다.
2. API Spec
1) Request
Endpoint | product environment: https://prod.ax-cloud.com/v1/channel/orders/ticket/{ax_order_code}/tickets/{ticket_code}/refunds} |
---|---|
Method | POST |
Description | 채널에서 특정 주문의 환불이 진행된 건에 대해 AX Cloud와 동기화합니다. |
Content-Type | application/json |
Headers > Authorization | Token {api_key} |
Headers > Channel | Code {channel_code} |
2) Body Parameter
Name | Required | Type | Description |
---|---|---|---|
price | O | String |
|
canceled_datetime | O | Datetime |
|
refunded_datetime | O | Datetime |
|
policy | O | Object |
|
3) Response
Name | Type | Description |
---|---|---|
status_code | Integer | 정상 처리 시 200 |
Expand | ||
---|---|---|
| ||
|
4) Error Spec
Expand | ||
---|---|---|
| ||
|
Expand | ||
---|---|---|
| ||
|
3. Request Example
1) CURL
Code Block |
---|
curl -X 'PATCH' \
'https://prod.ax-cloud.com/v1/channel/orders/ticket/b9872ed4-12c5-4fb5-ae18-4f39b11ee912/tickets/915c1218-f41c-492b-bb0b-96177ff4d2ee/refunds' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H "Authorization: Token api_key_secret" \
-d '{ \
"price": "5000",
"canceled_datetime": "2021-01-20 21:13:13",
"refunded_datetime": "2021-01-20 23:24:29",
"policy": {"0%": "Use date 1일 전부터는 환불 불가", "50%": "Use date 3일 전", "100%": “Use date 7일 전"}
}'
|
...