跳到主要内容

创建撤销

对一笔符合条件的成功交易,在 Capture 或清算前创建 Void。Void 只撤销整笔授权,与退款相互独立,不会创建退款或自动降级调用退款接口;渠道不支持时返回 CHANNEL_VOID_NOT_SUPPORTED。

POSThttps://api.efundpay.com/v4/transactions/{transaction_id}/voids
This endpoint requires the transactions.write scope.

Authorizations

Authorizationstringheaderrequired

`Bearer <token>` 格式的认证请求头。

Headers

x-merchant-account-idstringrequired

原交易所属的商户账户。

Examples:""default""

Path Parameters

transaction_idstringrequired

原成功交易的 EFundPay 唯一标识。

Examples:"7099948d-7286-47e4-aad8-b68f7eb44591"

Body

application/json
external_identifierstringrequired

商户生成的唯一 Void 标识。只有完全相同的重试才复用该值。

Length:1 - 64
Examples:"void-20260827-001"
reasonstring

取消授权的原因。

Length:0 - 256
Examples:"Customer canceled before settlement"

Response

application/json

Successful Response

typestringrequired

资源类型。

Examples:"void"
transaction_idstringrequired

原交易的 EFundPay 唯一标识。

external_identifierstringrequired

请求中传入的商户 Void 标识。

transaction_external_identifierstringrequired

原交易的商户外部标识。

channel_codestringrequired

原支付渠道编码。

statusstringrequired

Void 状态。processing 表示渠道已异步受理;succeeded 表示撤销成功并进入终态。

Examples:"processing""succeeded"
curl --request POST \
--url https://api.efundpay.com/v4/transactions/7099948d-7286-47e4-aad8-b68f7eb44591/voids \
--header 'Authorization: Bearer <token>' \
--header 'x-merchant-account-id: <x-merchant-account-id>' \
--header 'Content-Type: application/json' \
--data '{
"external_identifier": "void-20260827-001",
"reason": "Customer canceled before settlement"
}'
{
"type": "void",
"transaction_id": "7099948d-7286-47e4-aad8-b68f7eb44591",
"external_identifier": "void-20260827-001",
"transaction_external_identifier": "payment-12345",
"channel_code": "Adyen-icr",
"status": "processing"
}
Powered by Docusaurus