Wallet Payments
Wallet payments (WALLET) require the user to log in to their wallet provider through a redirect and approve the payment.
Once the first payment is successful with tokenized wallets, a token is returned which can be used to make recurring payments without the need of a redirect or to avoid authenticate again.

Payment flow

See the characteristics of the different flows to use. You can follow one of them:
Flow
Description
One time payment wallets REDIRECT
In this flow, the customer is always redirected to the wallet's website to authenticate and complete the payment. Once that's done, will be redirected back to the merchant site.
Tokenized wallets REDIRECT DIRECT
In this flow, the customer is redirected to the wallet's website to authenticate and authorize future payments. If wallet.save = TRUE in the request, the asynchronous notification will include a wallet.token, which can be used for further payments without the need to authenticate again.

One time payment wallets

In this flow, the customer is always redirected to the wallet's website to authenticate and complete the payment. Once that's done, will be redirected back to the merchant site.

Available wallets

To integrate wallet payments, you must identify and complete the payment_method_id field of each one you want to use.
You can get the payment method list or view all the available wallets by country in the Payment method section.

Verify flow

Example request
Example 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 'Content-Type: application/json' \
6
-H 'X-Version: 2.1' \
7
-H 'User-Agent: MerchantTest / 1.0 ' \
8
-H 'Authorization: V2-HMAC-SHA256, Signature: 1bd227f9d892a7f4581b998c21e353b1686a6bdad5940e7bb6aa596c96e0a6ec' \
9
-d '{body}'
10
https://api.dlocal.com/payments
11
12
{
13
"amount": 26,
14
"currency": "ARS",
15
"country": "AR",
16
"payment_method_id": "MP",
17
"payment_method_flow": "REDIRECT",
18
"payer": {
19
"name": "Thiago Gabriel",
20
"email": "[email protected]",
21
"document": "53033315550"
22
},
23
"description": "Exclusive contents with this service",
24
"order_id": "5346523564",
25
"notification_url": "http://merchant.com/notifications",
26
"callback_url": "http://merchant.com/callback"
27
}
Copied!
1
{
2
"id": "R-4-41f8628f-b6ec-4c02-96d5-c5b03cac7cb0",
3
"amount": 26,
4
"currency": "ARS",
5
"payment_method_id": "MP",
6
"payment_method_type": "WALLET",
7
"payment_method_flow": "REDIRECT",
8
"country": "AR",
9
"created_date": "2018-12-26T20:37:20.000+0000",
10
"status": "PENDING",
11
"status_detail": "The payment is pending.",
12
"status_code": "100",
13
"order_id": "5346523564",
14
"description": "Exclusive contents with this service",
15
"notification_url": "http://merchant.com/notifications",
16
"redirect_url": "https://sandbox.dlocal.com/collect/pay/pay/M-0aa0cc00-094e-11e9-9f92-dbdad3ad0963?xtid=CATH-ST-1545856640-602791137"
17
}
Copied!

Tokenized wallets

In this flow, the customer is redirected to the wallet's website to authenticate and authorize future payments. If wallet.save = TRUE in the request, the asynchronous notification will include a wallet.token, which can be used for further payments without the need to authenticate again.

Available wallets

To integrate wallet payments, you must identify and complete the payment_method_id field of each one you want to use.
You can get the payment method list or view all the available wallets by country in the Payment method section.

Verify flow

Example request
Example 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 'Content-Type: application/json' \
6
-H 'X-Version: 2.1' \
7
-H 'User-Agent: MerchantTest / 1.0 ' \
8
-H 'Authorization: V2-HMAC-SHA256, Signature: 1bd227f9d892a7f4581b998c21e353b1686a6bdad5940e7bb6aa596c96e0a6ec' \
9
-d '{body}'
10
https://api.dlocal.com/payments
11
12
{
13
"amount": 0,
14
"currency": "ARS",
15
"country": "AR",
16
"payment_method_id": "MP",
17
"payment_method_flow": "REDIRECT",
18
"payer": {
19
"name": "Thiago Gabriel",
20
"email": "[email protected]",
21
"document": "53033315550"
22
},
23
"wallet": {
24
"save": true,
25
"verify": true,
26
"capture": false,
27
"label": "New subscription for merchant service"
28
},
29
"description": "Exclusive contents with this service",
30
"order_id": "5346523564",
31
"notification_url": "http://merchant.com/notifications",
32
"callback_url": "http://merchant.com/callback"
33
}
Copied!
1
{
2
"id": "D-4-75c7473a-ab86-4e43-bd39-c840268747d3",
3
"amount": 0,
4
"currency": "ARS",
5
"payment_method_id": "MP",
6
"payment_method_type": "WALLET",
7
"payment_method_flow": "REDIRECT",
8
"country": "AR",
9
"created_date": "2018-12-26T20:37:20.000+0000",
10
"status": "PENDING",
11
"status_detail": "The payment is pending",
12
"status_code": "100",
13
"order_id": "5346523564",
14
"notification_url": "http://merchant.com/notifications",
15
"redirect_url": "https://sandbox.dlocal.com/collect/pay/pay/M-0aa0cc00-094e-11e9-9f92-dbdad3ad0963?xtid=CATH-ST-1545856640-602791137"
16
}
Copied!

Asynchronous notification

If wallet.save = TRUE, the notification will include a wallet.token as long as the user authenticated successfully (regardless of if the payment was approved or not).

Example asynchronous notification

POST: {payment.notification_url}
1
{
2
"id": "D-4-75c7473a-ab86-4e43-bd39-c840268747d3",
3
"amount": 0.00,
4
"status": "VERIFIED",
5
"status_detail": "The wallet was verified.",
6
"status_code": "700",
7
"currency": "USD",
8
"country": "AR",
9
"payment_method_id": "MP",
10
"payment_method_type": "WALLET",
11
"payment_method_flow": "REDIRECT",
12
"payer": {
13
"name": "Thiago Gabriel",
14
"email": "[email protected]",
15
"document": "53033315550"
16
},
17
"wallet": {
18
"token": "W-yu23y4ibnyiu23y4",
19
"userid": "45696493593"
20
},
21
"order_id": "5346523564",
22
"notification_url": "http://www.merchant.com/notifications",
23
"created_date": "2018-12-26T20:37:20.000+0000"
24
}
Copied!

Sale plus verify flow

In this flow the user is going to be charged with the amount indicated in the request. In case merchant send the "save"=true parameter in the wallet object. it will also generate a wallet token for future payments.
Example request
Example 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 'Content-Type: application/json' \
6
-H 'X-Version: 2.1' \
7
-H 'User-Agent: MerchantTest / 1.0 ' \
8
-H 'Authorization: V2-HMAC-SHA256, Signature: 1bd227f9d892a7f4581b998c21e353b1686a6bdad5940e7bb6aa596c96e0a6ec' \
9
-d '{body}'
10
https://api.dlocal.com/payments
11
12
{
13
"amount": 10.00,
14
"currency": "ARS",
15
"country": "AR",
16
"payment_method_id": "MP",
17
"payment_method_flow": "REDIRECT",
18
"payer": {
19
"name": "Thiago Gabriel",
20
"email": "[email protected]",
21
"document": "53033315550"
22
},
23
"wallet": {
24
"save": true,
25
"verify": false
26
},
27
"description": "Exclusive contents with this service",
28
"order_id": "5346523564",
29
"notification_url": "http://merchant.com/notifications",
30
"callback_url": "http://merchant.com/callback"
31
}
Copied!
1
{
2
"id": "D-4-75c7473a-ab86-4e43-bd39-c840268747d3",
3
"amount": 10.00,
4
"currency": "ARS",
5
"payment_method_id": "MP",
6
"payment_method_type": "WALLET",
7
"payment_method_flow": "REDIRECT",
8
"country": "AR",
9
"created_date": "2018-02-20T15:44:42.320Z",
10
"status": "PENDING",
11
"status_detail": "The payment is pending",
12
"status_code": "100",
13
"order_id": "5346523564",
14
"notification_url": "http://merchant.com/notifications",
15
"redirect_url": "https://sandbox.dlocal.com/collect/pay/pay/M-0aa0cc00-094e-11e9-9f92-dbdad3ad0963?xtid=CATH-ST-1545856640-602791137"
16
}
Copied!

The DeviceId Object (for Mercado Pago only)

Property
Type
Description
deviceId
String
Device web unique identificator. Use dedicated script to collect it. Example: 5cf65fc6c5db631a47471bb0. Required only if browser is web.
fingerprint
Object
Used for mobile devices. See example and SDKs following. Required only if used on native mobile app.

Web

Add the following script on website:
1
<script src="https://www.mercadopago.com/v2/security.js" view="checkout"></script>
Copied!

Mobile

Use the following SDK to get mobile device fingerprint:
1
new Device(context);
Copied!
1
Device()pt
Copied!

Mobile fingerprint example

1
"fingerprint": {
2
"os": "iOS",
3
"system_version": "8.3",
4
"ram": 18446744071562067968,
5
"disk_space": 498876809216,
6
"model": "MacBookPro9,2",
7
"free_disk_space": 328918237184,
8
"vendor_ids": [
9
{
10
"name": "vendor_id",
11
"value": "C2508642-79CF-44E4-A205-284A4F4DE04C"
12
},
13
{
14
"name": "uuid",
15
"value": "AB28738B-8DC2-4EC2-B514-3ACF330482B6"
16
}
17
],
18
"vendor_specific_attributes": {
19
"feature_flash": false,
20
"can_make_phone_calls": false,
21
"can_send_sms": false,
22
"video_camera_available": true,
23
"cpu_count": 4,
24
"simulator": true,
25
"device_languaje": "en",
26
"device_idiom": "Phone",
27
"platform": "x86_64",
28
"device_name": "iPhone Simulator",
29
"device_family": 4,
30
"retina_display_capable": true,
31
"feature_camera": false,
32
"device_model": "iPhone Simulator",
33
"feature_front_camera": false
34
},
35
"resolution": "375x667"
36
}
Copied!