分期付款
信用卡分期付款与信用卡普通付款类似。终端用户可以选择将付款总金额在定期时间内分别支付分期交易金额。第一笔分期付款金额将立即记入终端用户的信用卡,剩下的分期付款金额将定期自动扣款。
发起信用卡分期交易前,您需要先联系Liquido获取分期计划并拿到Plan ID。根据支付流程的不同,Plan ID分为Direct和Redirect两种使用方式。
创建一个Direct流程的信用卡分期付款支付
您需要分期计划的Plan ID来创建分期方案,以获取Proposal ID。请注意,若您需要在方案里面包含除了分期之外的其他目的方案,那么您需要通过创建多目的方案来创建方案。使用Proposal ID(proposalId) 和分期付款期数(installments),您就可以前往发起信用卡分期付款。
HTTP请求
POST /v1/payments/charges/card
Request Headers{
    "Content-Type": "application/json",
    "Authorization": "Bearer {{access_token}}",
    "x-api-key": "{{api_key}}"
}
 
Request Body{
    "idempotencyKey": "62cc10c8-baba-4c92-b6da-935cbd422dcd",
    "amount": 100000,
    "currency": "USD",
    "country": "BR",
    "paymentMethod": "CARD",
    "paymentFlow": "DIRECT",
    ...  # 其它请求字段
    "paymentProposalInfo": {
        "proposalId": "beb199db-fb9c-481b-a951-73b905d5ce43"
    },
    "installments": 12,
    ...  # 其它请求字段
}
 
 
Response{
    "transferStatusCode": 200,
    "idempotencyKey": "62cc10c8-baba-4c92-b6da-935cbd422dcd",
    "referenceId": "62cc10c8-baba-4c92-b6da-935cbd422dcd",
    "paymentMethod": "CARD",
    "paymentFlow": "DIRECT",
    "amount": 100000,
    "currency": "USD",
    "finalAmount": 551093,
    "finalCurrency": "BRL",
    "country": "BR",
    ...  # 其它响应字段
    "amountDetails": {
        "fxAmountDetails": {
            "fxRate": {
                "modifierType": "RATE",
                "base": "USD",
                "target": "BRL",
                "timestamp": 1664443743,
                "exchangeRate": 5.4835098
            },
            "baseAmount": 100000,
            "targetAmount": 548351
        },
        "installmentAmountDetails": {
            "installmentAmount": 45924,
            "installments": 12,
            "totalAmount": 551093
        }
    },
    ...  # 其它响应字段
}
 
 
 
 
| Key | Value | 
| Authorization | "Bearer" + " " + {{access_token}} | 
| x-api-key | {{api_key}} | 
Request Body 字段说明
| 参数 | 必填 | 类型 | 描述 | 
| paymentProposalInfo |  | JSON | 分期付款方案信息。创建分期付款支付时为必填。 | 
| installments |  | Integer | 分期付款期数。创建Direct流程分期付款支付时为必填。 | 
Response Body 字段说明
创建一个Redirect流程的信用卡分期付款支付
您需要在Redirect流程的支付请求中,加上分期计划的Plan ID,这样付款人就可以选择计划中配置的分期选项。
HTTP请求
POST /v1/payments/charges/card
Request Headers{
    "Content-Type": "application/json",
    "Authorization": "Bearer {{access_token}}",
    "x-api-key": "{{api_key}}"
}
 
Request Body{
    "idempotencyKey": "7fd3ab68-1aa3-4e8f-852d-592b7250f296",
    "amount": 100000,
    "currency": "BRL",
    "country": "BR",
    "paymentMethod": "CARD",
    "paymentFlow": "REDIRECT",
    "callbackUrl": "https://api.client.com/callback/",
    "merchantRedirectInfo": {
        "merchantPageUrl": "https://www.merchantpageexample.com/123456"
    },
    ...  # 其它请求字段
    "paymentProposalInfo": {
        "paymentIntentInfo": {
            "installmentPlanId": "2b87300c-2f1e-48c1-9f73-5722661d7c15"
        }
    },
    ...  # 其它请求字段
}
 
 
Response{
    "transferStatusCode": 200,
    "idempotencyKey": "7fd3ab68-1aa3-4e8f-852d-592b7250f296",
    "referenceId": "7fd3ab68-1aa3-4e8f-852d-592b7250f296",
    "paymentMethod": "CARD",
    "paymentFlow": "REDIRECT",
    "amount": 100000,
    "currency": "BRL",
    "finalAmount": 100000,
    "finalCurrency": "BRL",
    ...  # 其它响应字段
    "redirectUrl": "https://www.redirect-qa.liquido.com?uid=aa2b2a03-70d2-4ce9-b6e5-4d17ff912f89",
    ...  # 其它响应字段
}
 
 
 
 
| Key | Value | 
| Authorization | "Bearer" + " " + {{access_token}} | 
| x-api-key | {{api_key}} | 
Request Body 字段说明
对象字段说明
paymentProposalInfo
| 参数 | 必填 | 类型 | 描述 | 
| proposalId |  | String | 分期付款方案ID。Direct流程时必填。 | 
| paymentIntentInfo |  | JSON | 分期付款方案ID。Redirect流程时必填。 | 
paymentIntentInfo
| 参数 | 必填 | 类型 | 描述 | 
| installmentPlanId |  | String | 分期付款计划ID。 | 
amountDetails
taxAmountDetails
| 参数 | 类型 | 描述 | 
| taxRate | JSON | 税率详情 | 
| amount | Long | 税费金额,单位是货币最小粒度。 如 1 = 0.01BRL | 
fxAmountDetails
| 参数 | 类型 | 描述 | 
| fxRate | JSON | 汇率详情 | 
| baseAmount | Long | 当前货币的金额,单位是货币最小粒度。 如 1 = 0.01USD | 
| targetAmount | Long | 目标货币的金额,单位是货币最小粒度。 如 1 = 0.01BRL | 
installmentAmountDetails
| 参数 | 类型 | 描述 | 
| installmentAmount | Long | 分期付款金额,单位是货币最小粒度。 如 1 = 0.01BRL | 
| installments | Integer | 分期付款期数 | 
| totalAmount | Long | 分期付款总金额,单位是货币最小粒度。 如 1 = 0.01BRL | 
taxRate
| 参数 | 类型 | 描述 | 
| rate | Positive Float | 税率 | 
| type | String | 税费类型 | 
fxRate
| 参数 | 类型 | 描述 | 
| base | String | 当前货币代码,如 USD | 
| target | String | 目标货币代码,如 BRL | 
| timestamp | Long | 货币转换时的时间戳 | 
| exchangeRate | Positive Float | 汇率 |