Skip to content

取消重复支付

当某个重复支付的支付状态为ACTIVE时,可以将其取消。

HTTP 请求

POST /v1/payments/charges/references/cancel/{{idempotencyKey}}

Request Headers
{
    "Authorization": "Bearer {{access_token}}",
    "x-api-key": "{{api_key}}"
}
Content-Type: application/json
{
    "transferStatusCode": 200,
    "idempotencyKey": "06c28bb9-9bbe-4e8b-9064-2a23daff914d",
    "country": "PE",
    "currency": "PEN",
    "createTime": "2025-02-19 19:38:03 UTC",
    "status": "CANCELLED",
    "description": "this is a test reference",
    "callbackUrl": "https://api.client.com/callback/",
    "transferDetails": {
        "payCash": {
            "amount": 0,
            "expirationDate": "2025-02-21",
            "reference": "7041740022683866"
        }
    }
}

HTTP Headers 字段说明

Key Value
Authorization "Bearer" + " " + {{access_token}}

路径参数

参数 类型 描述
idempotencyKey String 商户系统创建的唯一ID。

Response Body 字段说明

参数 类型 描述
transferStatusCode Integer 此次交易的状态码, 200表示交易成功或者进行中, 其他代表失败
idempotencyKey String 此参数用于幂等目的,交易的唯一标识ID
country String 国家编码
currency String 收款货币代码
createTime String 创建时间
status String 交易状态,如果成功了应该是CANCELLED
description String 描述信息
transferDetails JSON 交易类型的详细信息

对象字段说明

TransferDetails
参数 类型 描述
payCash JSON PayCash支付的详细信息
PayCash
参数 类型 描述
amount Long 交易金额
expirationDate String 过期日期 当地时间 "yyyy-MM-dd"
reference String 这是一个可以被多次重复使用的交易号。支付者在支付时,需要提供的交易号(reference number/referencia)。需要注意的是除此之外,用户还需根据其支付网点,提交对应的协议号
Back to top