Skip to main content
POST
/
v1
/
payments
/
{id}
/
refund
curl -X POST https://api.sandbox.zafapay.com/v1/payments/tx_abc123/refund \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 500,
    "reason": "お客様都合"
  }'
{
  "id": "orf_xyz789",
  "transaction_id": "tx_abc123",
  "amount": 500,
  "status": "succeeded",
  "psp_refund_id": "re_xxxxx",
  "refund_fee": 100
}

パスパラメータ

id
string
required
トランザクションID(例: tx_abc123

リクエスト

amount
number
返金金額(小数点以下2桁まで対応。例: 17.62)。省略時は全額返金。
reason
string
返金理由

レスポンス

id
string
返金ID(orf_プレフィックス)
transaction_id
string
トランザクションID
amount
number
返金金額
status
string
返金ステータス(succeeded
psp_refund_id
string
PSP側の返金ID
refund_fee
number
返金手数料
curl -X POST https://api.sandbox.zafapay.com/v1/payments/tx_abc123/refund \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 500,
    "reason": "お客様都合"
  }'
{
  "id": "orf_xyz789",
  "transaction_id": "tx_abc123",
  "amount": 500,
  "status": "succeeded",
  "psp_refund_id": "re_xxxxx",
  "refund_fee": 100
}

Authorizations

Authorization
string
header
required

Bearer authentication using access token

Path Parameters

id
string
required

Transaction ID

Example:

"tx_abc123"

Body

application/json
amount
number

Refund amount (supports up to 2 decimal places). If omitted, full refund is processed.

Example:

5.5

reason
string

Refund reason

Example:

"Customer request"

Response

Refund successful

id
string

Refund ID

Example:

"orf_xyz789"

transaction_id
string

Transaction ID

Example:

"tx_abc123"

amount
string

Refund amount (string format)

Example:

"5.50"

status
string

Refund status

Example:

"succeeded"

psp_refund_id
string

PSP refund ID

Example:

"re_xxxxx"

refund_fee
string

Refund fee (string format)

Example:

"1.00"