查询退款
通过唯一标识符查询指定退款。该接口返回该退款的详细信息,包括当前状态、金额及关联交易信息。
GEThttps://api.efundpay.com/v4/refunds/{refund_id}
This endpoint requires the
transactions.read
scope.Authorizations
Authorizationstringheaderrequired
认证请求头,格式为 `Bearer <token>`,`<token>` 为您的认证令牌。
Headers
x-merchant-account-idstringrequired
用于本次请求的商户账户ID。
Examples:
""default""
Path Parameters
refund_idstringrequired
要查询的退款唯一标识。
Examples:
"6a1d4e46-14ed-4fe1-a45f-eff4e025d211"
Response
application/json
Successful Response
typestringrequired
资源类型,固定为 "refund"。
Examples:
"refund"
idstringrequired
唯一退款标识。
Examples:
"6a1d4e46-14ed-4fe1-a45f-eff4e025d211"
transaction_idstringrequired
被退款的交易ID。
Examples:
"7099948d-7286-47e4-aad8-b68f7eb44591"
statusstringrequired
退款状态。可选值:processing、succeeded、failed、declined、voided。
Examples:
"succeeded"
"failed"
"processing"
currencystringrequired
本次退款的货币代码。
Examples:
"EUR"
"USD"
"GBP"
amountintegerrequired
退款金额,单位为最小货币单位。
Examples:
"1299"
reasonstringrequired
退款原因。
Examples:
"Refund due to user request."
"Product return"
"Order cancellation"
external_identifierstringrequired
退款的外部标识符。
Examples:
"refund-12345"
transaction_external_identifierstringrequired
商户支付单号,原交易的外部标识符。
Examples:
"transaction-12345"
created_atstringrequired
创建时间(ISO 8601)。
Examples:
"2013-07-16T19:23:00.000+00:00"
curl --request GET \--url https://api.efundpay.com/v4/refunds/6a1d4e46-14ed-4fe1-a45f-eff4e025d211 \--header 'Authorization: Bearer <token>' \--header 'x-merchant-account-id: <x-merchant-account-id>' \
{"type": "refund","id": "6a1d4e46-14ed-4fe1-a45f-eff4e025d211","transaction_id": "7099948d-7286-47e4-aad8-b68f7eb44591","status": "succeeded","currency": "EUR","amount": 1299,"reason": "Refund due to user request.","external_identifier": "refund-12345","transaction_external_identifier": "transaction-12345","created_at": "2013-07-16T19:23:00.000+00:00"}