Installments
Marlim provides your customer with the option to split the purchase into up to 12 installments. This endpoint will only be necessary if your platform passes on the Acquirer fees to your end consumer.
With this route, it is possible to calculate the fees that your platform needs to charge, before making a transaction to return the installment values and monthly fees.
Request Query Params
| Attribute | Type | Description |
|---|---|---|
| net_value | int32 | The net value that your platform wants to receive for a transaction. |
| card_brand | int32 | Card brand. Accepted values: visa, mastercard, amex, hipercard and elo. |
| pt_br | boolean | Optional parameter that can be passed to return values formatted in Brazilian Real (BRL). Default: false |
| chargeback_owner | string | Optional parameter that defines who will be responsible for the transaction chargeback. Accepted values: acquirer or seller Default: acquirer |
The value in net_value must be passed in cents (e.g., R$ 10.00 = 1000) and must be greater than or equal to R$ 1.00 (100).
Response Object
| Property | Type | Description |
|---|---|---|
| installment | string | Number of installments. |
| amount | int32 | Final amount to be charged to the consumer regarding the installment (including acquirer fees). |
| installment_value | int32 | Amount that the consumer will be charged monthly. |
| interest_rate | float32 | Value referring to the percentage of the acquirer fee. |
| pt_br | object | Object with values formatted in Brazilian Real (BRL). |
Brazilian Real Object
To facilitate the Front-End, you can optionally pass the parameter pt_br with the value true to return the values formatted in Brazilian Real (BRL / R$).
| Property | Type | Description |
|---|---|---|
| amount | float32 | The amount value divided by 100. The reverse path of cents. |
| amount_currency | string | The amount value using the Javascript method toLocaleString() |
| installment_value | float32 | The monthly installment value divided by 100. The reverse path of cents. |
| installment_value_currency | string | The monthly installment value using the Javascript method toLocaleString() |
| interest_rate | string | Percentage of the acquirer fee in pt_br format. |
Chargeback
The parameter chargeback_owner defines the responsibility for chargebacks in transactions:
acquirer: Marlim assumes responsibility for chargebacksseller: your Company assumes responsibility for chargebacks
When chargeback_owner is seller, installments are calculated with specific fees for this modality, resulting in different final values from those calculated when responsibility is Marlim's.
Examples
- Visa Card
- Mastercard with BRL formatting
- Seller chargeback responsibility
curl -X GET -G "https://api.marlim.co/v3/installments" \
-H "Content-Type: application/json" \
-H "api_key: api_key_value" \
-d net_value=1000 \
-d card_brand="visa"
[
{
"installment": "1",
"amount": 1030,
"installment_value": 1030,
"interest_rate": 3
},
{
"installment": "2",
"amount": 1060,
"installment_value": 530,
"interest_rate": 6
},
{
"installment": "3",
"amount": 1090,
"installment_value": 363,
"interest_rate": 9
},
{
"installment": "4",
"amount": 1120,
"installment_value": 280,
"interest_rate": 12
},
{
"installment": "5",
"amount": 1150,
"installment_value": 230,
"interest_rate": 15
},
{
"installment": "6",
"amount": 1180,
"installment_value": 196,
"interest_rate": 18
},
{
"installment": "7",
"amount": 1210,
"installment_value": 172,
"interest_rate": 21
},
{
"installment": "8",
"amount": 1240,
"installment_value": 155,
"interest_rate": 24
},
{
"installment": "9",
"amount": 1270,
"installment_value": 141,
"interest_rate": 27
},
{
"installment": "10",
"amount": 1300,
"installment_value": 130,
"interest_rate": 30
},
{
"installment": "11",
"amount": 1330,
"installment_value": 120,
"interest_rate": 33
},
{
"installment": "12",
"amount": 1360,
"installment_value": 113,
"interest_rate": 36
}
]
curl -X GET -G "https://api.marlim.co/v3/installments" \
-H "Content-Type: application/json" \
-H "api_key: api_key_value" \
-d net_value=1000 \
-d card_brand="mastercard" \
-d pt_br="true"
[
{
"installment": "1",
"amount": 1030,
"installment_value": 1030,
"interest_rate": 3,
"pt_br": {
"amount": 10.3,
"amount_currency": "R$ 10,30",
"installment_value": 10.3,
"installment_value_currency": "R$ 10,30",
"interest_rate": "3,00%"
}
},
{
"installment": "2",
"amount": 1060,
"installment_value": 530,
"interest_rate": 6,
"pt_br": {
"amount": 10.6,
"amount_currency": "R$ 10,60",
"installment_value": 5.3,
"installment_value_currency": "R$ 5,30",
"interest_rate": "6,00%"
}
},
{
"installment": "3",
"amount": 1090,
"installment_value": 363,
"interest_rate": 9,
"pt_br": {
"amount": 10.9,
"amount_currency": "R$ 10,90",
"installment_value": 3.63,
"installment_value_currency": "R$ 3,63",
"interest_rate": "9,00%"
}
},
{
"installment": "4",
"amount": 1120,
"installment_value": 280,
"interest_rate": 12,
"pt_br": {
"amount": 11.2,
"amount_currency": "R$ 11,20",
"installment_value": 2.8,
"installment_value_currency": "R$ 2,80",
"interest_rate": "12,00%"
}
},
{
"installment": "5",
"amount": 1150,
"installment_value": 230,
"interest_rate": 15,
"pt_br": {
"amount": 11.5,
"amount_currency": "R$ 11,50",
"installment_value": 2.3,
"installment_value_currency": "R$ 2,30",
"interest_rate": "15,00%"
}
},
{
"installment": "6",
"amount": 1180,
"installment_value": 196,
"interest_rate": 18,
"pt_br": {
"amount": 11.8,
"amount_currency": "R$ 11,80",
"installment_value": 1.96,
"installment_value_currency": "R$ 1,96",
"interest_rate": "18,00%"
}
},
{
"installment": "7",
"amount": 1210,
"installment_value": 172,
"interest_rate": 21,
"pt_br": {
"amount": 12.1,
"amount_currency": "R$ 12,10",
"installment_value": 1.72,
"installment_value_currency": "R$ 1,72",
"interest_rate": "21,00%"
}
},
{
"installment": "8",
"amount": 1240,
"installment_value": 155,
"interest_rate": 24,
"pt_br": {
"amount": 12.4,
"amount_currency": "R$ 12,40",
"installment_value": 1.55,
"installment_value_currency": "R$ 1,55",
"interest_rate": "24,00%"
}
},
{
"installment": "9",
"amount": 1270,
"installment_value": 141,
"interest_rate": 27,
"pt_br": {
"amount": 12.7,
"amount_currency": "R$ 12,70",
"installment_value": 1.41,
"installment_value_currency": "R$ 1,41",
"interest_rate": "27,00%"
}
},
{
"installment": "10",
"amount": 1300,
"installment_value": 130,
"interest_rate": 30,
"pt_br": {
"amount": 13,
"amount_currency": "R$ 13,00",
"installment_value": 1.3,
"installment_value_currency": "R$ 1,30",
"interest_rate": "30,00%"
}
},
{
"installment": "11",
"amount": 1330,
"installment_value": 120,
"interest_rate": 33,
"pt_br": {
"amount": 13.3,
"amount_currency": "R$ 13,30",
"installment_value": 1.2,
"installment_value_currency": "R$ 1,20",
"interest_rate": "33,00%"
}
},
{
"installment": "12",
"amount": 1360,
"installment_value": 113,
"interest_rate": 36,
"pt_br": {
"amount": 13.6,
"amount_currency": "R$ 13,60",
"installment_value": 1.13,
"installment_value_currency": "R$ 1,13",
"interest_rate": "36,00%"
}
}
]
curl -X GET -G "https://api.marlim.co/v3/installments" \
-H "Content-Type: application/json" \
-H "api_key: api_key_value" \
-d net_value=1000 \
-d card_brand="visa" \
-d chargeback_owner="seller"
[
{
"installment": "1",
"amount": 1020,
"installment_value": 1020,
"interest_rate": 2
},
{
"installment": "2",
"amount": 1040,
"installment_value": 520,
"interest_rate": 4
},
{
"installment": "3",
"amount": 1060,
"installment_value": 353,
"interest_rate": 6
},
{
"installment": "4",
"amount": 1080,
"installment_value": 270,
"interest_rate": 8
},
{
"installment": "5",
"amount": 1100,
"installment_value": 220,
"interest_rate": 10
},
{
"installment": "6",
"amount": 1120,
"installment_value": 186,
"interest_rate": 12
},
{
"installment": "7",
"amount": 1140,
"installment_value": 162,
"interest_rate": 14
},
{
"installment": "8",
"amount": 1160,
"installment_value": 145,
"interest_rate": 16
},
{
"installment": "9",
"amount": 1180,
"installment_value": 131,
"interest_rate": 18
},
{
"installment": "10",
"amount": 1200,
"installment_value": 120,
"interest_rate": 20
},
{
"installment": "11",
"amount": 1220,
"installment_value": 110,
"interest_rate": 22
},
{
"installment": "12",
"amount": 1240,
"installment_value": 103,
"interest_rate": 24
}
]