创建分期方案
在发起分期交易前,您需要先联系Liquido获取分期计划并拿到Plan ID。然后您需要使用这个Plan ID来创建分期方案,以获取proposal ID。
请注意,若您需要在方案里面包含除了分期之外的其他目的方案,那么您需要通过创建多目的方案来创建方案。
HTTP请求
POST /v1/payments/proposals
Request Headers{
    "Content-Type": "application/json",
    "Authorization": "Bearer {{access_token}}",
    "x-api-key": "{{api_key}}"
}
 
Request Body{
    "amount": 100000,
    "country": "BR",
    "currency": "BRL",
    "installmentPlanId": "2daac1cf-40f0-4311-9114-fb7e10e5f682"
}
 
 
Response{
    "id": "beb199db-fb9c-481b-a951-73b905d5ce43",
    "submitTime": "2022-11-14T05:49:57Z",
    "expirationTime": "2022-11-14T06:49:57Z",
    "paymentIntent":{
        "amount":100000,
        "country":"BR",
        "currency":"BRL",
        "installmentPlanId":"2daac1cf-40f0-4311-9114-fb7e10e5f682"
    },
    "planDetails": {
        "installment": [
            {
                "modifierType": "RATE",
                "rate": 0.02,
                "installments": 3
            },
            {
                "modifierType": "RATE",
                "rate": 0.05,
                "installments": 6
            },
            {
                "modifierType": "RATE",
                "rate": 0.1,
                "installments": 12
            }
        ]
    },
    "proposalDetails": {
        "installmentProposalDetails": [
            {
                "installmentAmount": 183478,
                "installments": 3,
                "totalAmount": 550435
            },
            {
                "installmentAmount": 94437,
                "installments": 6,
                "totalAmount": 566624
            },
            {
                "installmentAmount": 49467,
                "installments": 12,
                "totalAmount": 593606
            }
        ]
    }
}
 
 
 
 
| Key | 
Value | 
| Authorization | 
"Bearer" + " " + {{access_token}} | 
| x-api-key | 
{{api_key}} | 
Request Body 字段说明
| 参数 | 
必填 | 
类型 | 
描述 | 
| amount | 
 | 
Long | 
金额,单位是货币最小粒度。 如 1 = 0.01BRL | 
| country | 
 | 
String | 
国家编号国际缩写码,遵循ISO 3166-1 alpha-2 code标准, 如巴西BR | 
| currency | 
 | 
String | 
货币代码,如USD、BRL、MXN、COP、PEN或者CLP | 
| installmentPlanId | 
 | 
String | 
分期付款计划ID | 
Response Body 字段说明
对象字段说明
paymentIntent
| 参数 | 
类型 | 
描述 | 
| amount | 
Long | 
金额,单位是货币最小粒度。 如 1 = 0.01BRL | 
| country | 
String | 
国家编号国际缩写码,遵循ISO 3166-1 alpha-2 code标准, 如巴西BR | 
| currency | 
String | 
货币代码,如USD或BRL | 
| installmentPlanId | 
String | 
分期付款计划ID | 
planDetails
installment
| 参数 | 
类型 | 
描述 | 
| modifierType | 
String | 
类型,RATE | 
| rate | 
Positive Float | 
附加费率 | 
| installments | 
String | 
分期付款期数 | 
proposalDetails
installmentProposalDetails
| 参数 | 
类型 | 
描述 | 
| installmentAmount | 
Long | 
分期付款金额,单位是货币最小粒度。 如 1 = 0.01BRL | 
| installments | 
Integer | 
分期付款期数 | 
| totalAmount | 
Long | 
分期付款总金额,单位是货币最小粒度。 如 1 = 0.01BRL |