Create agreementhttps://api.mercadopago.com/v2/wallet_connect/agreements
An agreement is an authorization link that the buyer receives to allow the seller to access their Mercado Pago wallet to debit the payment.
POST
Request parameters
Header
Authorization
Access Token obtained through the developer panel. Must be sent in all requests.string
REQUIRED
x-platform-id
Field intended for platforms or modules that offer Mercado Pago in their solutions.string
Query
client.id
Unique ID that identifies a specific client.number
Body
return_uri
URL that redirects the user back to the sellers site.string
external_flow_id
Identifies the Seller side flow current state.string
external_user
The external_user contains the data that the seller will need to use to indentify a User, so then it can continue with their own flow.object
agreement_data
Contains information about actions the user must do and the amount to be paid.object
Response parameters
agreement_id
Unique ID that identifies an agreement.string
agreement_uri
Esto es el uri para redirigir al usuario al enlace de la billetera en el frontend. .string
Errors
400Error
400
Bad-Request
Request
curl -X POST \
'https://api.mercadopago.com/v2/wallet_connect/agreements?client.id=<CLIENT.ID>'\
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer APP_USR-8*********932064-12*********edf6d3c99*********2236c703f*********668' \
-H 'x-platform-id: YOUR_PLATFORM_ID' \
-d '{
"return_uri": "https://www.mercadopago.com/",
"external_flow_id": "EXTERNAL_FLOW_ID",
"external_user": {
"id": "usertest",
"description": "Test account"
},
"agreement_data": {
"validation_amount": 3.14,
"description": "Test agreement"
}
}'Response
{
"agreement_id": "22abcd1235ed497f945f755fcaba3c6c",
"agreement_uri": "https://wwww.mercadopago.com.ar/v1/wallet_agreement/22abcd1235ed497f945f755fcaba3c6c"
}