Skip to content

取消未完成的支付

下列为支持取消支付功能所对应的paymentMethodtransferStatus

地区 paymentMethod transferStatus
Colombia CARD AUTHORIZED

HTTP请求

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

Request Headers
{
    "Content-Type": "application/json",
    "Authorization": "Bearer {{access_token}}",
    "x-api-key": "{{api_key}}"
}
Content-Type: application/json
{
    "transferStatusCode": 200,
    "idempotencyKey": "2583995e-b2e8-49d3-b2d6-ce2e98744e8b",
    "referenceId": "2583995e-b2e8-49d3-b2d6-ce2e98744e8b",
    "paymentFlow": "DIRECT",
    "paymentMethod": "CARD",
    "amount": 50000,
    "currency": "COP",
    "finalAmount": 50000,
    "finalCurrency": "COP",
    "country": "CO",
    "createTime": "2023-10-20 07:16:23 UTC",
    "scheduledTime": "2023-10-20 07:16:24 UTC",
    "finalStatusTime": "2023-10-20 07:17:14 UTC",
    "payer": {
        "name": "username",
        "email": "username@liquido.com",
        "billingAddress": {
            "street": "Simón Bolívar",
            "number": "12121",
            "city": "Álamos",
            "state": "CDMX",
            "zipCode": "03400"
        }
    },
    "transferStatus": "CANCELLED",
    "description": "this is a test pay",
    "callbackUrl": "https://api.client.com/callback/",
    "subMerchantId": "UUID"
}

HTTP Headers 字段说明

Key Value
Authorization "Bearer" + " " + {{access_token}}
x-api-key {{api_key}}

路径参数

参数 类型 描述
idempotencyKey String 此参数用于幂等目的,交易的唯一标识ID,长度不大于128个字节。

Response Body 字段说明

参数 类型 描述
transferStatusCode Integer 此次交易的状态码, 200代表取消成功
idempotencyKey String 此参数用于幂等目的,交易的唯一标识ID,长度不大于128个字节。
referenceId String 此次交易的ID
paymentMethod String 支付方式 CARD
amount Long 收款金额
currency String 收款货币代码,长度为3个字节
finalAmount Long 用于创建收款订单的最终金额。对于需要转换汇率的收款订单,这个字段的值表示源请求金额被转换后的金额。
finalCurrency String finalAmount的收款货币代码
country String 国家编码
createTime String 创建时间
scheduledTime String 执行时间
finalStatusTime String 最终状态更新时间
payer JSON 付款人信息
transferStatus String 汇款状态,如果取消成功应该更新为CANCELLED
description String 描述信息
callbackUrl String 商户接收通知的回调地址. 接收http的post请求
subMerchantId String 子商户ID。
transferErrorMsg String 此次交易失败原因

对象字段说明

Payer
参数 类型 描述
name String 名字,全称
email String 邮箱
phone String 手机号码
document JSON 可确认身份的证件
billingAddress JSON 账单邮寄地址
Document
参数 类型 描述
documentId String 证件号
type String 证件类型
BillingAddress
参数 类型 描述
zipCode String 邮政编码,如巴西的CEP
state String 州,缩写,如圣保罗是SP
city String 城市
district String 区县
street String 街道
number String 门牌号
complement String 补充信息
country String 国家代码

支付状态

参数 描述
IN_PROGRESS 交易处理中
SETTLED 交易完成
EXPIRED 交易过期
CANCELLED 交易取消
FAILED 交易失败,异常
Back to top