跳转至

取消

取消未支付的payment link.

请求

POST /v2/cashier/payment-link/cancel

Headers
{
    "Content-Type": "application/json",
    "Authorization": "Bearer {{access_token}}",
    "x-api-key": "{{api_key}}"
}
Body
{
    "linkId": "{{link_id}}"
}
Content-Type: application/json
{
    "code": 0,
    "message": "success",
    "data": {
        "linkId": "ewGHNonFhmO7be8otCt9tA",
        "orderId": "2023-03-31T17:05:00-103",
        "amount": 599,
        "currency": "BRL",
        "country": "BR",
        "paymentStatus": "CANCELLED",
        "redirectUrl": null,
        "callbackUrl": null,
        "finalPaymentMethod": null,
        "finalStatusTimestamp": 1680247253,
        "finalStatusTime": "2023-03-31 15:20:53",
        "refundAmount": null,
        "refundStatus": "INITIAL_STATUS",
        "refundTime": null,
        "refundTimestamp": 0,
        "name": null,
        "email": "liquido-test@gmail.com",
        "phone": "+551234556799",
        "documentId": null,
        "description": "this is a test link",
        "transferDetails": {
            "pix": null,
            "boleto": null,
            "bankTransfer": null,
            "payCash": null,
            "pse": null,
            "nequi": null
        },
        "allowPaymentMethods": [
            "BOLETO",
            "PIX"
        ],
        "billingAddress": {
            "zipCode": "04849333",
            "state": "SP",
            "city": "sao paulo",
            "district": "Jardim Gaivotas",
            "street": "Rua 9 de setembro",
            "number": "15",
            "country": "BR",
            "complement": "casa"
        },
        "merchant": {
            "name": null,
            "logo": null,
            "needRefundInfo": false
        },
        "createTime": "2023-03-31 15:20:12",
        "updateTime": "2023-03-31 15:20:53",
        "shippingAddress": {
          "name": "name",
          "countryCode": "BR",
          "province": "province/state",
          "city": "city",
          "postalCode": "04849334",
          "line1": "Address Info",
          "line2": "Address Info"
        },
        "refunded": false,
        "expiredTime": "2023-10-18 09:21:06",
        "createTime": "2023-10-11 09:21:06",
        "updateTime": "2023-10-11 09:21:06",
        "needCollectAddress": true
    }
}

=== "Http状态码400响应"

```json
{
    "code": 400,
    "message": "Can't cancel the payment link when status is SETTLED.",
    "data": {
        "errorMessage": "Can't cancel the payment link when status is SETTLED."
    }
}
```

Request Body 字段说明

参数 必填 类型 描述
linkId String 支付链接唯一id.

Response Body 字段说明

参数 类型 描述
linkId String payment link在liquido系统的唯一id.
orderId String 商家的唯一的订单id
amount Long 支付金额。 单位分。 例如 100=1BRL
country String 国家代码
currency String 收款货币代码,长度为3个字节,如巴西: BRL
allowPaymentMethods List 声明支付页面包含哪些支付方式。 默认值是CREDIT_CARD. 已支持的支付方式查看这里
paymentStatus String 支付状态,枚举: INITIAL_STATUS, IN_PROGRESS, SETTLED, CANCELLED.
finalPaymentMethod String 用户完成支付的支付方式.
finalStatusTime String 用户完成支付的时间,时间格式: "yyyy-MM-dd HH:mm:ss", UTC时区
finalStatusTimestamp Long 用户完成支付的时间戳。
refundTime String 退款时间,如果支付没有退款,则为null,时间格式: "yyyy-MM-dd HH:mm:ss", 时区: UTC
refundTimestamp Long 退款完成的时间戳. 如果没有退款,则为0
refunded Boolean 是否已退款
refundAmount Long 退款金额。 单位分。例如100=1BRL。
refundStatus String 退款状态,枚举: INITIAL_STATUS, IN_PROGRESS, SETTLED, FAILED.
email String 用户邮箱。
phone String 用户手机号。必须包含国际区号,如"+55".
billingAddress Address Object 账单地址.
shippingAddress JSON 收货地址。
callbackUrl String 商户接收回调通知的url. 如果为空则不发送通知.
redirectUrl String 支付完成后的重定向地址,如果为空则不重定向。
description String 支付描述
needCollectAddress Boolean 值为true或者false。
expiredTime String Payment link的到期时间。
createTime String Payment link的创建时间。
updateTime String Payment link的更新时间。

BillingAddress 对象字段说明

参数 类型 描述
zipCode String 邮政编码,如巴西的CEP
state String 州,缩写,如圣保罗是SP
city String 城市.
district String 区县.
street String 街道.
number String 门牌号.
complement String 补充信息.
country String 国家代码.

ShippingAddress 对象字段说明

参数 类型 描述
name String 收货人姓名。
countryCode String 国家编号。
province String 省份或者州。
city String 城市。
postalCode String 邮编。
line1 String 地址详情。
line2 String 地址详情。
回到页面顶部