Parcelas
A Marlim fornece ao seu cliente a opção de parcelar a compra em até 12x. Esse endpoint só será necessário caso sua plataforma repasse as taxas de Adquirência para o seu consumidor final.
Com essa rota é possível calcular as taxas que sua plataforma precisa cobrar, antes de realizar uma transação para retornar os valores das parcelas e as taxas ao mês.
GETv3/installments
Request Query Params
Atributo | Tipo | Descrição |
---|---|---|
net_value | int32 | O valor líquido que sua plataforma deseja receber por uma transação. |
card_brand | int32 | Bandeira do cartão. Valores aceitos: visa , mastercard , amex , hipercard e elo . |
pt_br | boolean | Parâmetro opcional que pode ser passado para retornar valores formatados em Real Brasileiro (BRL). Default: false |
Atenção
O valor em net_value
deve ser passado em centavos (ex: R$ 10,00 = 1000) e deve ser maior ou igual a R$ 1,00 (100).
Response Object
Propriedade | Tipo | Descrição |
---|---|---|
installment | string | Quantidade de parcelas. |
amount | int32 | Valor final a ser cobrado do consumidor referente a parcela (com as taxas de adquirência inclusas). |
installment_value | int32 | Valor que o consumidor será cobrado ao mês. |
interest_rate | float32 | Valor referente a porcentagem da taxa de adquirência. |
pt_br | object | Objeto com valores formatados em Real Brasileiro (BRL). |
Real Brasileiro Object
Para facilitar o Front-End, opcionalmente você pode passar o parâmetro pt_br
com o valor true
para retornar os valores formatados em Real Brasileiro (BRL / R$).
Propriedade | Tipo | Descrição |
---|---|---|
amount | float32 | O valor em amout dividido por 100. O caminho inverso dos centavos. |
amount_currency | string | O valor em amout utilizando o método do Javascript toLocaleString() |
installment_value | float32 | O valor mensal da parcela dividido por 100. O caminho inverso dos centavos. |
installment_value_currency | string | O valor mensal da parcela utilizando o método do Javascript toLocaleString() |
interest_rate | string | Porcentagem da taxa de adquirência em formato pt_br. |
Exemplos
- Cartão Visa
- Cartão Amex
- PT_BR
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": 1054,
"installment_value": 1054,
"interest_rate": 5.4
},
{
"installment": "2",
"amount": 1078,
"installment_value": 539,
"interest_rate": 7.78
},
{
"installment": "3",
"amount": 1091,
"installment_value": 364,
"interest_rate": 9.09
},
{
"installment": "4",
"amount": 1104,
"installment_value": 276,
"interest_rate": 10.41
},
{
"installment": "5",
"amount": 1118,
"installment_value": 224,
"interest_rate": 11.78
},
{
"installment": "6",
"amount": 1132,
"installment_value": 189,
"interest_rate": 13.17
},
{
"installment": "7",
"amount": 1152,
"installment_value": 165,
"interest_rate": 15.25
},
{
"installment": "8",
"amount": 1167,
"installment_value": 146,
"interest_rate": 16.74
},
{
"installment": "9",
"amount": 1183,
"installment_value": 131,
"interest_rate": 18.26
},
{
"installment": "10",
"amount": 1198,
"installment_value": 120,
"interest_rate": 19.83
},
{
"installment": "11",
"amount": 1214,
"installment_value": 110,
"interest_rate": 21.43
},
{
"installment": "12",
"amount": 1231,
"installment_value": 103,
"interest_rate": 23.08
}
]
curl -X GET -G "https://api.marlim.co/v3/installments" \
-H "Content-Type: application/json" \
-H "api_key: api_key_value" \
-d net_value=2000 \
-d card_brand="amex"
[
{
"installment": "1",
"amount": 2122,
"installment_value": 2122,
"interest_rate": 6.12
},
{
"installment": "2",
"amount": 2159,
"installment_value": 1080,
"interest_rate": 7.96
},
{
"installment": "3",
"amount": 2185,
"installment_value": 728,
"interest_rate": 9.27
},
{
"installment": "4",
"amount": 2212,
"installment_value": 553,
"interest_rate": 10.6
},
{
"installment": "5",
"amount": 2239,
"installment_value": 448,
"interest_rate": 11.97
},
{
"installment": "6",
"amount": 2267,
"installment_value": 378,
"interest_rate": 13.37
},
{
"installment": "7",
"amount": 2308,
"installment_value": 330,
"interest_rate": 15.38
},
{
"installment": "8",
"amount": 2338,
"installment_value": 292,
"interest_rate": 16.88
},
{
"installment": "9",
"amount": 2368,
"installment_value": 263,
"interest_rate": 18.4
},
{
"installment": "10",
"amount": 2400,
"installment_value": 240,
"interest_rate": 19.98
},
{
"installment": "11",
"amount": 2432,
"installment_value": 221,
"interest_rate": 21.58
},
{
"installment": "12",
"amount": 2465,
"installment_value": 205,
"interest_rate": 23.23
}
]
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": 1054,
"installment_value": 1054,
"interest_rate": 5.4,
"pt_br": {
"amount": 10.54,
"amount_currency": "R$ 10,54",
"installment_value": 10.54,
"installment_value_currency": "R$ 10,54",
"interest_rate": "5,4%"
}
},
{
"installment": "2",
"amount": 1078,
"installment_value": 539,
"interest_rate": 7.78,
"pt_br": {
"amount": 10.78,
"amount_currency": "R$ 10,78",
"installment_value": 5.39,
"installment_value_currency": "R$ 5,39",
"interest_rate": "7,78%"
}
},
{
"installment": "3",
"amount": 1091,
"installment_value": 364,
"interest_rate": 9.09,
"pt_br": {
"amount": 10.91,
"amount_currency": "R$ 10,91",
"installment_value": 3.64,
"installment_value_currency": "R$ 3,64",
"interest_rate": "9,09%"
}
},
{
"installment": "4",
"amount": 1104,
"installment_value": 276,
"interest_rate": 10.41,
"pt_br": {
"amount": 11.04,
"amount_currency": "R$ 11,04",
"installment_value": 2.76,
"installment_value_currency": "R$ 2,76",
"interest_rate": "10,41%"
}
},
{
"installment": "5",
"amount": 1118,
"installment_value": 224,
"interest_rate": 11.78,
"pt_br": {
"amount": 11.18,
"amount_currency": "R$ 11,18",
"installment_value": 2.24,
"installment_value_currency": "R$ 2,24",
"interest_rate": "11,78%"
}
},
{
"installment": "6",
"amount": 1132,
"installment_value": 189,
"interest_rate": 13.17,
"pt_br": {
"amount": 11.32,
"amount_currency": "R$ 11,32",
"installment_value": 1.89,
"installment_value_currency": "R$ 1,89",
"interest_rate": "13,17%"
}
},
{
"installment": "7",
"amount": 1152,
"installment_value": 165,
"interest_rate": 15.25,
"pt_br": {
"amount": 11.52,
"amount_currency": "R$ 11,52",
"installment_value": 1.65,
"installment_value_currency": "R$ 1,65",
"interest_rate": "15,25%"
}
},
{
"installment": "8",
"amount": 1167,
"installment_value": 146,
"interest_rate": 16.74,
"pt_br": {
"amount": 11.67,
"amount_currency": "R$ 11,67",
"installment_value": 1.46,
"installment_value_currency": "R$ 1,46",
"interest_rate": "16,74%"
}
},
{
"installment": "9",
"amount": 1183,
"installment_value": 131,
"interest_rate": 18.26,
"pt_br": {
"amount": 11.83,
"amount_currency": "R$ 11,83",
"installment_value": 1.31,
"installment_value_currency": "R$ 1,31",
"interest_rate": "18,26%"
}
},
{
"installment": "10",
"amount": 1198,
"installment_value": 120,
"interest_rate": 19.83,
"pt_br": {
"amount": 11.98,
"amount_currency": "R$ 11,98",
"installment_value": 1.2,
"installment_value_currency": "R$ 1,20",
"interest_rate": "19,83%"
}
},
{
"installment": "11",
"amount": 1214,
"installment_value": 110,
"interest_rate": 21.43,
"pt_br": {
"amount": 12.14,
"amount_currency": "R$ 12,14",
"installment_value": 1.1,
"installment_value_currency": "R$ 1,10",
"interest_rate": "21,43%"
}
},
{
"installment": "12",
"amount": 1231,
"installment_value": 103,
"interest_rate": 23.08,
"pt_br": {
"amount": 12.31,
"amount_currency": "R$ 12,31",
"installment_value": 1.03,
"installment_value_currency": "R$ 1,03",
"interest_rate": "23,08%"
}
}
]