跳转至

创建一个支付链接

请求

Note

如果您需要使用paymentIntentInfo参数,请联系客户经理进行配置。
参数installmentPlanId将被弃用。请使用paymentIntentInfo.installmentPlanId传入。

POST /v2/cashier/payment-link/

Headers
{
    "Content-Type": "application/json",
    "Authorization": "Bearer {{access_token}}",
    "x-api-key": "{{api_key}}"
}
Body
{
    "orderId": "2022-12-15T14:07:00-01",
    "amount": 9999,
    "currency": "BRL",
    "country": "BR",
    "allowPaymentMethods": [
        "CREDIT_CARD",
        "PIX",
        "BANK_TRANSFER_BR",
        "BOLETO"
    ],
    "name": "buyer name",
    "email": "liquido-test@gmail.com",
    "phone": "+5511999999999",
    "documentId": "51364124025",
    "billingAddress": {
        "zipCode": "04849333",
        "state": "SP",
        "city": "sao paulo",
        "district": "Jardim Gaivotas",
        "street": "Rua 9 de setembro",
        "number": "15",
        "complement": "casa",
        "country": "BR"
    },
    "shippingAddress": {
      "name": "name",
      "countryCode": "BR",
      "province": "province/state",
      "city": "city",
      "postalCode": "04849334",
      "line1": "Address Info",
      "line2": "Address Info"
    },
    "callbackUrl": "https://your-domain/callback/",
    "redirectUrl": "https://your-domain/checkout-page",
    "installmentPlanId": "Outdated",
    "description": "this is a test payment",
    "needCollectAddress": true,
    "paymentIntentInfo": {
        "installmentPlanId": "a22f9260-c78e-48f3-1234-9f1d59505295",
        "taxPlanId":"277a8f61-0d28-49ae-1234-cbd229130c0e",
        "targetCurrency":"BRL"
    },
    "metadata": {
        "key1": "value1",
        "key2": "value2",
        ...
    }
}
Content-Type: application/json
{
    "paymentLink": "https://buy.liquido.com/{{linkId}}",
    "linkId": "{{linkId}}"
}
{
    "code": 400,
    "message": "Minimum amount of Boleto is 5BRL.",
    "data": {
        "errorMessage": "Minimum amount of Boleto is 5BRL."
    }
}

支持的支付方式

支付方式 国家代码 限制 注意事项
CREDIT_CARD BR, MX, CO
PIX BR
BOLETO BR >= 5BRL
BANK_TRANSFER_BR BR
BANK_TRANSFER_MX MX
OXXO MX
PAY_CASH MX, CO <= 20,000 MXN or <= 3,000,000 COP
PSE CO >= 2000 COP name,phone和email必填。
NEQUI CO >= 2000 COP name,phone和email必填。
BANCOLOMBIA_COLLECTION CO >= 1500 COP email必填。
BANCOLOMBIA_BUTTON CO >= 2000 COP email必填。
WEB_PAY CL >= 1 CLP email 和 description 必填。
KHIPU CL >= 1 CLP email 和 description 必填。
MACH CL >= 1 CLP email 和 description 必填。
CHEK CL >= 1 CLP email 和 description 必填。
FPAY CL >= 1 CLP 2023年10月31日下架。 email 和 description 必填。
PAGO46 CL >= 1000 CLP email 和 description 必填。
MULTICAJA_CASH CL >= 1 CLP email 和 description 必填。
MULTICAJA_TRANSFER CL >= 1 CLP email 和 description 必填。
HITES CL >= 1 CLP email 和 description 必填。

Request Headers 字段说明

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

Request Body 字段说明

参数 必填 类型 描述
orderId String 商家的唯一的订单id
amount Long 支付金额。 单位分。 例如 100=1BRL。如果货币代码是COP, 则amount必须是100的倍数。
country String 国家代码
currency String 收款货币代码,长度为3个字节,BRL
allowPaymentMethods List 声明支付页面包含哪些支付方式, 不能为空。页面展示的支付方式默认顺序和allowPaymentMethods一致。 已支持的支付方式查看这里
name String 用户全名, 不超过50字符。如果商户在支付流程之前预收集了用户的名字,可以在创建payment link时发送给liquido。该信息将在支付表单中自动填充。
email String 用户邮箱, 不超过64字符。如果商户在支付流程之前预收集了用户的邮箱,可以在创建payment link时发送给liquido。该信息将在风控系统中使用。
phone String 用户手机号。如果商户在支付流程之前预收集了用户的手机号,可以在创建payment link时发送给liquido。该信息将在风控系统中使用。
documentId String 居民身份证件号,如巴西的CPF/CNPJ。不含分隔字符。 该信息将在支付表单中自动填充。
billingAddress Address Object 账单地址。如果商户在支付流程之前预收集了用户的账单地址,可以在创建payment link时发送给liquido。该信息可用于Boleto支付表单的预填充。
callbackUrl String 当payment link 的支付状态变化时,liquido会向callbackUrl发送一个post请求。详情看这里
redirectUrl String 当redirectUrl非空时,payment link支付成功后会重定向到redirectUrl。
installmentPlanId String 创建一个分期付款的信用卡支付时才需要。(过时的,不推荐使用)
description String 支付描述
needCollectAddress Boolean 应传值为true或者false。如果您需要payment link帮忙收集用户的收货地址,您可以将此字段设置为true,那么payment link里会有相应给用户填写收货地址的地方。
paymentIntentInfo PaymentIntentInfo Object 支付意向。如果有分期、换汇、税等要求可以传入对应的参数。(该功能需要联系客户经理做配置才可使用)
metadata JSON 商家预留字段,键值对都是String

BillingAddress 对象字段说明

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

ShippingAddress Object Parameters

参数 必填 类型 描述
name String 收货人姓名,字段仅当对象有被提供时必填。
countryCode String 国家编号,字段仅当对象有被提供时必填。
province String 省份或者州,字段仅当对象有被提供时必填。
city String 城市,字段仅当对象有被提供时必填。
postalCode String 邮编,字段仅当对象有被提供时必填。
line1 String 地址详情,字段仅当对象有被提供时必填。
line2 String 地址详情,字段仅当对象有被提供时必填。

PaymentIntentInfo Object Parameters

参数 必填 类型 描述
installmentPlanId String 分期计划ID
taxPlanId String 税收计划ID
targetCurrency String 当地货币,使用换汇功能是需要才需要提供。

Response Body 字段说明

参数 类型 描述
paymentLink String 支付链接.
linkId String 支付链接的唯一id.
回到页面顶部