GET https://platform-api.lia.com.br/external_api/v1/offers/:id/payment_info
How this route work
This route serves as a tool to simulate accurate installment prices when selecting financing options. With an offer ID provided, the route returns the down payment value and an array of possible recurring installment amounts, varying by the number of installments in the financing plan.
The payment configuration itself is a property of the payment_info
, and we also have the installments_values
array. This array is used to show the user how much they will pay for the selected installments, so for example, if the user choose to pay in 24 installments in the financed configuration, the correct value will be this one:
{
payment_configuration: ...,
"down_payment_amount": 11970,
"installments_values": [
{
"installments": 24,
"installment_amount": 5360
},
{
"installments": 23,
"installment_amount: 5870
},
...
]
}
{
"installments": 24,
"installment_amount": 5360
}
This should be shown to the user during checkout:
- First installment (down payment): R$ 119,70
- Second to last installments: R$ 53,60
- Total installments: 24
Example request
curl --location 'https://platform-api-sandbox.lia.com.br/external_api/v1/offers/764e20fd-5530-4bcd-a408-b109b0505a48/payment_info' \
--header 'Authorization: Bearer token'
Example response
[
{
"enabled": true,
"installments_values": [
{
"installments": 2,
"installment_amount": 92520,
"down_payment": 11970
},
{
"installments": 3,
"installment_amount": 46899,
"down_payment": 11970
},
{
"installments": 4,
"installment_amount": 31695,
"down_payment": 11970
},
{
"installments": 5,
"installment_amount": 24097,
"down_payment": 11970
},
{
"installments": 6,
"installment_amount": 19540,
"down_payment": 11970
},
{
"installments": 7,
"installment_amount": 16504,
"down_payment": 11970
},
{
"installments": 8,
"installment_amount": 14337,
"down_payment": 11970
},
{
"installments": 9,
"installment_amount": 12713,
"down_payment": 11970
},
{
"installments": 10,
"installment_amount": 11451,
"down_payment": 11970
},
{
"installments": 11,
"installment_amount": 10443,
"down_payment": 11970
},
{
"installments": 12,
"installment_amount": 9620,
"down_payment": 11970
},
{
"installments": 13,
"installment_amount": 8934,
"down_payment": 11970
},
{
"installments": 14,
"installment_amount": 8355,
"down_payment": 11970
},
{
"installments": 15,
"installment_amount": 7859,
"down_payment": 11970
},
{
"installments": 16,
"installment_amount": 7430,
"down_payment": 11970
},
{
"installments": 17,
"installment_amount": 7056,
"down_payment": 11970
},
{
"installments": 18,
"installment_amount": 6726,
"down_payment": 11970
},
{
"installments": 19,
"installment_amount": 6434,
"down_payment": 11970
},
{
"installments": 20,
"installment_amount": 6173,
"down_payment": 11970
},
{
"installments": 21,
"installment_amount": 5938,
"down_payment": 11970
},
{
"installments": 22,
"installment_amount": 5727,
"down_payment": 11970
},
{
"installments": 23,
"installment_amount": 5535,
"down_payment": 11970
},
{
"installments": 24,
"installment_amount": 5360,
"down_payment": 11970
}
],
"payment_configuration": {
"allowed_down_payment_methods": ["boleto", "pix", "credit_card"],
"availability": "enabled",
"down_payment_type": "percentage",
"down_payment_value": 0.1,
"expires_in": 12,
"financed_type": "bolepix",
"id": "a12d5381-81ba-4784-a4c6-588e22de850e",
"interest_rate": 0.028,
"max_down_payment_installments": 12,
"max_installments": 24,
"min_installment_amount_cents": 5000,
"payment_methods": ["boleto", "credit_card", "pix"],
"payment_type": "financed",
"registration_fee": 0.0197,
"take_rate_type": "percentage",
"take_rate_value": 0.0897
}
},
{
"enabled": true,
"installments_values": [
{
"installments": 2,
"installment_amount": 92520,
"down_payment": 11970
},
{
"installments": 3,
"installment_amount": 46899,
"down_payment": 11970
},
{
"installments": 4,
"installment_amount": 31695,
"down_payment": 11970
},
{
"installments": 5,
"installment_amount": 24097,
"down_payment": 11970
},
{
"installments": 6,
"installment_amount": 19540,
"down_payment": 11970
},
{
"installments": 7,
"installment_amount": 16504,
"down_payment": 11970
},
{
"installments": 8,
"installment_amount": 14337,
"down_payment": 11970
},
{
"installments": 9,
"installment_amount": 12713,
"down_payment": 11970
},
{
"installments": 10,
"installment_amount": 11451,
"down_payment": 11970
},
{
"installments": 11,
"installment_amount": 10443,
"down_payment": 11970
},
{
"installments": 12,
"installment_amount": 9620,
"down_payment": 11970
},
{
"installments": 13,
"installment_amount": 8934,
"down_payment": 11970
},
{
"installments": 14,
"installment_amount": 8355,
"down_payment": 11970
},
{
"installments": 15,
"installment_amount": 7859,
"down_payment": 11970
},
{
"installments": 16,
"installment_amount": 7430,
"down_payment": 11970
},
{
"installments": 17,
"installment_amount": 7056,
"down_payment": 11970
},
{
"installments": 18,
"installment_amount": 6726,
"down_payment": 11970
},
{
"installments": 19,
"installment_amount": 6434,
"down_payment": 11970
},
{
"installments": 20,
"installment_amount": 6173,
"down_payment": 11970
}
],
"payment_configuration": {
"allowed_down_payment_methods": ["credit_card"],
"availability": "enabled",
"down_payment_type": "percentage",
"down_payment_value": 0.05,
"expires_in": 24,
"financed_type": "card",
"id": "8d44d7c1-04e8-471e-a3a6-09fa95b947bb",
"interest_rate": 0.045,
"max_down_payment_installments": 6,
"max_installments": 20,
"min_installment_amount_cents": 2000,
"payment_methods": ["boleto", "credit_card", "pix"],
"payment_type": "financed",
"registration_fee": 0.0197,
"take_rate_type": "percentage",
"take_rate_value": 0.085
}
}
]