Skip to main content
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"
}

Authorizations

Authorization
string
header
required

API Key. 예: sk_live_xxxxx 또는 pk_live_xxxxx

Path Parameters

id
string
required

리소스 ID

Body

application/json
reason
string
required
amount
integer

직접 금액 지정 시 (lines 없을 때)

restock
boolean
default:true
lines
object[]

부분 환불 시 아이템/수량 지정

Response

201 - application/json

Created

id
string
order_id
string
amount
object
reason
string
restock
boolean
status
enum<string>
Available options:
pending,
completed,
failed
lines
object[]
created_at
string<date-time>