Installments
When creating a card payment with installments, the Merchant will receive the full amount of the payment at settlement, with no risks involved.
To create a payment with installments, first you need to create an Installments Plan, to guarantee the surcharge per installment that will be charged.
With the Installment Plan id ( installments_id ) and the number of installments, you can go ahead and create a payment with installments.
post
https://api.dlocal.com/
installments-plans
Create an Installments Plan

The Installment Plan Object

Installment Plan Object
Example Installment Plan Object
Property
Type
Description
id
String
The installments plan id.
country
String
The country of the installments plan.
currency
String
The currency of the installments plan.
bin
String
The credit card bin.
amount
Positive Float
The amount of the installments plan.
installments
The installments plan information
installments_by_bank
Boolean
If false: the installment interest is known beforehand and can be shown to the buyer. If true: The installment interest is not known beforehand and will be determined by the issuer. (*)
1
{
2
"id" : "INS54434",
3
"country" : "BR",
4
"bin" : "435921",
5
"amount": 1000.00,
6
"currency" : "BRL",
7
"installments" : [
8
{
9
"id" : "INS54434-1",
10
"installment_amount" : 1000.00,
11
"installments" : 1,
12
"total_amount" : 1000.00
13
},
14
{
15
"id" : "INS54434-2",
16
"installment_amount" : 550.00,
17
"installments" : 2,
18
"total_amount" : 1100.00
19
},
20
{
21
"id" : "INS54434-3",
22
"installment_amount" : 383.33,
23
"installments" : 3,
24
"total_amount" : 1150.00
25
}
26
],
27
"installments_by_bank": false
28
}
Copied!
(*) In these cases it is a good practice to give this information to users in the checkout in order to let them know that the bank will apply interests in the card statement.

The Installment Object

Installment Object
Example Installment Object
Property
Type
Description
id
String
The installment id.
installment_amount
Positive Float
Installment amount. Includes interests associated to the installment.
total_amount
Positive Float
Installments total amount. Includes interests associated to the installment.
installments
Integer
Number of installments.
1
{
2
"id" : "INS54434-2",
3
"installment_amount" : 550.00,
4
"installments" : 2,
5
"total_amount" : 1100.00
6
}
Copied!

Example Create Installment Plan

Example Create Installment Plan Request
Example Create Installment Plan Response
1
$ curl -X POST \
2
-H 'X-Date: 2018-02-20T15:44:42.310Z' \
3
-H 'X-Login: sak223k2wdksdl2' \
4
-H 'X-Trans-Key: fm12O7G9' \
5
-H 'X-Version: 2.1' \
6
-H 'User-Agent: MerchantTest / 1.0 ' \
7
-H 'Content-Type: application/json' \
8
-H 'Authorization: V2-HMAC-SHA256, Signature: 1bd227f9d892a7f4581b998c21e353b1686a6bdad5940e7bb6aa596c96e0a6ec' \
9
-d '{body}'
10
https://api.dlocal.com/installments-plans
Copied!
1
{
2
"country" : "BR",
3
"bin" : "411111",
4
"amount": 30,
5
"currency" : "BRL"
6
}
Copied!
1
{
2
"id" : "INS54434",
3
"country" : "BR",
4
"bin" : "435921",
5
"amount": 1000.00,
6
"currency" : "BRL",
7
"installments" : [
8
{
9
"id" : "INS54434-1",
10
"installment_amount" : 1000.00,
11
"installments" : 1,
12
"total_amount" : 1000.00
13
},
14
{
15
"id" : "INS54434-2",
16
"installment_amount" : 550.00,
17
"installments" : 2,
18
"total_amount" : 1100.00
19
},
20
{
21
"id" : "INS54434-3",
22
"installment_amount" : 383.33,
23
"installments" : 3,
24
"total_amount" : 1150.00
25
}
26
],
27
"installments_by_bank": false
28
}
Copied!

Example Payment with Installments

Example Payment Request
Example Payment Response
1
$ curl -X POST \
2
-H 'X-Date: 2018-02-20T15:44:42.310Z' \
3
-H 'X-Login: sak223k2wdksdl2' \
4
-H 'X-Trans-Key: fm12O7G9' \
5
-H 'X-Version: 2.1' \
6
-H 'User-Agent: MerchantTest / 1.0 ' \
7
-H 'Content-Type: application/json' \
8
-H 'Authorization: V2-HMAC-SHA256, Signature: 1bd227f9d892a7f4581b998c21e353b1686a6bdad5940e7bb6aa596c96e0a6ec' \
9
-d '{body}'
10
https://api.dlocal.com/payments
Copied!
1
{
2
"amount": 1000,
3
"currency" : "BRL",
4
"country": "BR",
5
"payment_method_id" : "VD",
6
"payment_method_flow" : "DIRECT",
7
"payer":{
8
"name" : "Thiago Gabriel",
9
"email" : "[email protected]",
10
"document" : "53033315550"
11
},
12
"card":{
13
"holder_name" : "Thiago Gabriel",
14
"number" : "4111111111111111",
15
"cvv" : "123",
16
"expiration_month" : 10,
17
"expiration_year" : 2040,
18
"installments" : "3",
19
"installments_id" : "INS54434"
20
},
21
"order_id": "657434343",
22
"notification_url": "http://merchant.com/notifications"
23
}
Copied!
1
{
2
"id": "D-4-e2227981-8ec8-48fd-8e9a-19fedb08d73a",
3
"amount": 1000.00,
4
"currency": "BRL",
5
"payment_method_id": "CARD",
6
"payment_method_type": "CARD",
7
"payment_method_flow": "DIRECT",
8
"country": "BR",
9
"card": {
10
"holder_name": "Thiago Gabriel",
11
"expiration_month": 10,
12
"expiration_year": 2040,
13
"brand": "VI",
14
"last4": "1111"
15
},
16
"created_date": "2019-02-06T21:04:43.000+0000",
17
"approved_date": "2019-02-06T21:04:44.000+0000",
18
"status": "PAID",
19
"status_detail": "The payment was paid.",
20
"status_code": "200",
21
"order_id": "657434343",
22
"notification_url": "http://merchant.com/notifications"
23
}
Copied!
Last modified 9d ago