메인 콘텐츠로 건너뛰기
POST
/
admin
/
orders
/
{id}
/
refunds
환불 생성
curl --request POST \
  --url https://api.headlesscommerce.io/v1/admin/orders/{id}/refunds \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "reason": "<string>",
  "amount": 123,
  "restock": true,
  "lines": [
    {
      "order_line_id": "<string>",
      "quantity": 2
    }
  ]
}
'
{
  "id": "<string>",
  "order_id": "<string>",
  "amount": {
    "amount": 123,
    "currency": "<string>"
  },
  "reason": "<string>",
  "restock": true,
  "status": "pending",
  "lines": [
    {
      "order_line_id": "<string>",
      "quantity": 123
    }
  ],
  "created_at": "2023-11-07T05:31:56Z"
}

인증

Authorization
string
header
필수

API Key. Example: sk_live_xxxxx or pk_live_xxxxx

경로 매개변수

id
string
필수

Resource ID

본문

application/json
reason
string
필수
amount
integer

When specifying amount directly (when lines are not provided)

restock
boolean
기본값:true
lines
object[]

Specify items/quantities for partial refund

응답

201 - application/json

생성됨

id
string
order_id
string
amount
object
reason
string
restock
boolean
status
enum<string>
사용 가능한 옵션:
pending,
completed,
failed
lines
object[]
created_at
string<date-time>