How to integrate payments in your application.
We expose information on how to charge the users for the active loans they have so, besides our collection efforts, you can offer a solution built-in your platform.
Payments
Payment calls are done to the /v1/payment/<document>/
URI with an HTTP GET method.
This endpoint returns a list of the active loans this user has, their installments and the invoices associated with them.
An example response looks like this:
[
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"date": "2022-04-30",
"status": "pending",
"installment_list": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"number": "1",
"amount": "50.00",
"due_date": "2022-03-30",
"status": "paid",
"invoice_list": []
},
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"number": "2",
"amount": "50.00",
"due_date": "2022-04-30",
"status": "overdue",
"invoice_list": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "pending",
"type": "boleto",
"barcode_format": "string",
"barcode": "string"
},
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "pending",
"type": "pix",
"code": "string",
"img_url": "string"
}
]
},
],
"paid_all": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"amount": "100.00",
"due_date": "2022-05-30",
"status": "pending",
"invoice_list": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "pending",
"type": "pix",
"code": "string",
"img_url": "string"
}
]
},
}
]
It's valid to have more than once invoice associated with one installment. During onboarding we setup which method is preffered to auto-populate the invoices of the loan. So you can fetch the information in this endpoint and present a barcode for a Boleto or a PIX QR code, etc.