Skip to main content

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.

GETv3/installments

Request Query Params

AttributeTypeDescription
net_valueint32The net value that your platform wants to receive for a transaction.
card_brandint32Card brand. Accepted values: visa, mastercard, amex, hipercard and elo.
pt_brbooleanOptional parameter that can be passed to return values formatted in Brazilian Real (BRL).
Default: false
chargeback_ownerstringOptional parameter that defines who will be responsible for the transaction chargeback. Accepted values: acquirer or seller
Default: acquirer
Warning

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

PropertyTypeDescription
installmentstringNumber of installments.
amountint32Final amount to be charged to the consumer regarding the installment (including acquirer fees).
installment_valueint32Amount that the consumer will be charged monthly.
interest_ratefloat32Value referring to the percentage of the acquirer fee.
pt_brobjectObject 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$).

PropertyTypeDescription
amountfloat32The amount value divided by 100. The reverse path of cents.
amount_currencystringThe amount value using the Javascript method toLocaleString()
installment_valuefloat32The monthly installment value divided by 100. The reverse path of cents.
installment_value_currencystringThe monthly installment value using the Javascript method toLocaleString()
interest_ratestringPercentage 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 chargebacks
  • seller: your Company assumes responsibility for chargebacks
Important

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

Request
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"
Response200
[
{
"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
}
]