PaymentIntent Refund
執行 - PaymentIntent 退款(Refund)
狀態類型
- success: 退款成功
- failed: 退款失敗
- rejected: 拒絕(原因會在 RejectReason 欄位中)
- processing: 退款處理中
- validation_error: request 驗證資料有誤
Path Parameters
id string required
PaymentIntent 編號
application/json
Request Body
amount double required
退款金額
reason string required
Possible values: non-empty
and <= 255 characters
退款原因
bankCode string nullable
退款銀行代碼 (ATM) 退款必填
bankBranchCode string nullable
退款銀行分行代碼 (ATM) 退款必填
bankAccount string nullable
退款銀行帳號 (ATM) 退款必填
Responses
- 200
- 400
- 422
Success
application/json
Schema
Example (from schema)
Schema
status int32
狀態碼
type string nullable
狀態
message string nullable
訊息
requestId string nullable
請求 ID
paginate object
total_count int32 nullable
total_page int32 nullable
page int32
頁數
limit int32
每頁顯示數量
result object
uuid string nullable
退款編號
paymentNo string nullable
付款編號
paymentIntentId string nullable
付款意圖 編號
amount double
退款金額
currency string nullable
幣別
status string nullable
退款狀態
reason string nullable
退款原因
initiator string nullable
發起人
isReady boolean
當所有資料都已準備好時,才會為true
rejectReason string nullable
拒絕原因
refundedAt string nullable
實際退款時間
createdAt string nullable
建立時間 ISO 8601
{
"status": 200,
"type": "success",
"message": "成功",
"requestId": "a32aaa44-50e4-42bb-a6b1-7709e3d8f0bd",
"paginate": {
"total_count": 0,
"total_page": 0,
"page": 1,
"limit": 10
},
"result": {
"uuid": "rf_7cb3c64f741d4353aa7b8efabafef94a",
"paymentNo": "PNO20230823a75c",
"paymentIntentId": "pp_23f3e9e8bf71499ca8a2db5882a8bbfb",
"amount": 100,
"currency": "TWD",
"status": "success",
"reason": "商品缺貨",
"initiator": "seller",
"isReady": true,
"rejectReason": "退款失敗:R018",
"refundedAt": "2023-07-21T07:26:51+00:00",
"createdAt": "2023-07-21T07:26:51+00:00"
}
}
Bad Request
application/json
Schema
Example (from schema)
Schema
status int32
狀態碼
type string nullable
狀態
message string nullable
訊息
result nullable
結果
requestId string nullable
請求 ID
{
"status": 400,
"type": "failed",
"message": "Refund amount must be less than or equal to than payment amount.",
"requestId": "a32aaa44-50e4-42bb-a6b1-7709e3d8f0bd"
}
Client Error
application/json
Schema
Example (from schema)
Schema
status int32
狀態碼
type string nullable
狀態
message string nullable
訊息
result nullable
結果
requestId string nullable
請求 ID
{
"status": 422,
"type": "parameter_validation_error",
"message": "One or more validation errors occurred.",
"result": {
"Amount": [
""
]
},
"requestId": "a32aaa44-50e4-42bb-a6b1-7709e3d8f0bd"
}
Loading...