Parcelas
A Marlim fornece ao seu cliente a opção de parcelar a compra de criptoativos em até 12x. Utilize esse endpoint antes de realizar uma transação para retornar os valores das parcelas e as taxas ao mês.
GETv2/installments
Request Query Params
Atributo | Tipo | Descrição |
---|---|---|
net_value | int32 | O valor a ser cobrado do cliente. |
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). |
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 total a ser cobrado do cliente referente a parcela. |
installment_value | int32 | Valor que o cliente 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.crypto.marlim.co/v2/installments" \
-H "Content-Type: application/json" \
-H "api_key: api_key_value" \
-d net_value=100000 \
-d card_brand="visa"
[
{
"installment": "1",
"amount": 103950,
"installment_value": 103950,
"interest_rate": 3.95
},
{
"installment": "2",
"amount": 105652,
"installment_value": 52826,
"interest_rate": 5.65
},
{
"installment": "3",
"amount": 106781,
"installment_value": 35594,
"interest_rate": 6.78
},
{
"installment": "4",
"amount": 107933,
"installment_value": 26983,
"interest_rate": 7.93
},
{
"installment": "5",
"amount": 109111,
"installment_value": 21822,
"interest_rate": 9.11
},
{
"installment": "6",
"amount": 110314,
"installment_value": 18386,
"interest_rate": 10.31
},
{
"installment": "7",
"amount": 112233,
"installment_value": 16033,
"interest_rate": 12.23
},
{
"installment": "8",
"amount": 113507,
"installment_value": 14188,
"interest_rate": 13.51
},
{
"installment": "9",
"amount": 114811,
"installment_value": 12757,
"interest_rate": 14.81
},
{
"installment": "10",
"amount": 116144,
"installment_value": 11614,
"interest_rate": 16.14
},
{
"installment": "11",
"amount": 117508,
"installment_value": 10683,
"interest_rate": 17.51
},
{
"installment": "12",
"amount": 118906,
"installment_value": 9909,
"interest_rate": 18.91
}
]
curl -X GET -G "https://api.crypto.marlim.co/v2/installments" \
-H "Content-Type: application/json" \
-H "api_key: api_key_value" \
-d net_value=500000 \
-d card_brand="amex"
[
{
"installment": "1",
"amount": 523013,
"installment_value": 523013,
"interest_rate": 4.6
},
{
"installment": "2",
"amount": 529101,
"installment_value": 264551,
"interest_rate": 5.82
},
{
"installment": "3",
"amount": 534759,
"installment_value": 178253,
"interest_rate": 6.95
},
{
"installment": "4",
"amount": 540540,
"installment_value": 135135,
"interest_rate": 8.11
},
{
"installment": "5",
"amount": 546448,
"installment_value": 109290,
"interest_rate": 9.29
},
{
"installment": "6",
"amount": 552486,
"installment_value": 92081,
"interest_rate": 10.5
},
{
"installment": "7",
"amount": 561798,
"installment_value": 80257,
"interest_rate": 12.36
},
{
"installment": "8",
"amount": 568182,
"installment_value": 71023,
"interest_rate": 13.64
},
{
"installment": "9",
"amount": 574713,
"installment_value": 63857,
"interest_rate": 14.94
},
{
"installment": "10",
"amount": 581395,
"installment_value": 58140,
"interest_rate": 16.28
},
{
"installment": "11",
"amount": 588235,
"installment_value": 53476,
"interest_rate": 17.65
},
{
"installment": "12",
"amount": 595238,
"installment_value": 49603,
"interest_rate": 19.05
}
]
curl -X GET -G "https://api.crypto.marlim.co/v2/installments" \
-H "Content-Type: application/json" \
-H "api_key: api_key_value" \
-d net_value=100000 \
-d card_brand="visa" \
-d pt_br=true
[
{
"installment": "1",
"amount": 103950,
"installment_value": 103950,
"interest_rate": 3.95,
"pt_br": {
"amount": 1039.5,
"amount_currency": "R$ 1.039,50",
"installment_value": 1039.5,
"installment_value_currency": "R$ 1.039,50",
"interest_rate": "3,95%"
}
},
{
"installment": "2",
"amount": 105652,
"installment_value": 52826,
"interest_rate": 5.65,
"pt_br": {
"amount": 1056.52,
"amount_currency": "R$ 1.056,52",
"installment_value": 528.26,
"installment_value_currency": "R$ 528,26",
"interest_rate": "5,65%"
}
},
{
"installment": "3",
"amount": 106781,
"installment_value": 35594,
"interest_rate": 6.78,
"pt_br": {
"amount": 1067.81,
"amount_currency": "R$ 1.067,81",
"installment_value": 355.94,
"installment_value_currency": "R$ 355,94",
"interest_rate": "6,78%"
}
},
{
"installment": "4",
"amount": 107933,
"installment_value": 26983,
"interest_rate": 7.93,
"pt_br": {
"amount": 1079.33,
"amount_currency": "R$ 1.079,33",
"installment_value": 269.83,
"installment_value_currency": "R$ 269,83",
"interest_rate": "7,93%"
}
},
{
"installment": "5",
"amount": 109111,
"installment_value": 21822,
"interest_rate": 9.11,
"pt_br": {
"amount": 1091.11,
"amount_currency": "R$ 1.091,11",
"installment_value": 218.22,
"installment_value_currency": "R$ 218,22",
"interest_rate": "9,11%"
}
},
{
"installment": "6",
"amount": 110314,
"installment_value": 18386,
"interest_rate": 10.31,
"pt_br": {
"amount": 1103.14,
"amount_currency": "R$ 1.103,14",
"installment_value": 183.86,
"installment_value_currency": "R$ 183,86",
"interest_rate": "10,31%"
}
},
{
"installment": "7",
"amount": 112233,
"installment_value": 16033,
"interest_rate": 12.23,
"pt_br": {
"amount": 1122.33,
"amount_currency": "R$ 1.122,33",
"installment_value": 160.33,
"installment_value_currency": "R$ 160,33",
"interest_rate": "12,23%"
}
},
{
"installment": "8",
"amount": 113507,
"installment_value": 14188,
"interest_rate": 13.51,
"pt_br": {
"amount": 1135.07,
"amount_currency": "R$ 1.135,07",
"installment_value": 141.88,
"installment_value_currency": "R$ 141,88",
"interest_rate": "13,51%"
}
},
{
"installment": "9",
"amount": 114811,
"installment_value": 12757,
"interest_rate": 14.81,
"pt_br": {
"amount": 1148.11,
"amount_currency": "R$ 1.148,11",
"installment_value": 127.57,
"installment_value_currency": "R$ 127,57",
"interest_rate": "14,81%"
}
},
{
"installment": "10",
"amount": 116144,
"installment_value": 11614,
"interest_rate": 16.14,
"pt_br": {
"amount": 1161.44,
"amount_currency": "R$ 1.161,44",
"installment_value": 116.14,
"installment_value_currency": "R$ 116,14",
"interest_rate": "16,14%"
}
},
{
"installment": "11",
"amount": 117508,
"installment_value": 10683,
"interest_rate": 17.51,
"pt_br": {
"amount": 1175.08,
"amount_currency": "R$ 1.175,08",
"installment_value": 106.83,
"installment_value_currency": "R$ 106,83",
"interest_rate": "17,51%"
}
},
{
"installment": "12",
"amount": 118906,
"installment_value": 9909,
"interest_rate": 18.91,
"pt_br": {
"amount": 1189.06,
"amount_currency": "R$ 1.189,06",
"installment_value": 99.09,
"installment_value_currency": "R$ 99,09",
"interest_rate": "18,91%"
}
}
]