AI resources
Create agreementhttps://api.mercadopago.com/v2/wallet_connect/agreements
This endpoint allows creating a link between buyer and seller, generating an authorization link to be sent to the buyer so the seller can access their Mercado Pago wallet and process payments. In case of success, the request will return a response with status 200.
POST
Request parameters
Header
Authorization
Access Token obtained through the developer panel. Must be sent in all requests.string
REQUIRED
x-platform-id
Identifier for platforms or modules that offer Mercado Pago within their solutions.string
Query
client.id
Unique identifier of the client application.number
Body
return_uri
URI to redirect the buyer after the agreement flow is completed.string
external_flow_id
Seller's internal identifier for the current flow state.string
external_user
Data used by the seller to identify the buyer within their own system.object
agreement_data
Additional data about the agreement, including optional amount and description.object
Response parameters
agreement_id
Unique identifier of the agreement.string
agreement_uri
URI to redirect the buyer to complete the wallet linking in the frontend.string
Errors
400Request error.
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*********88776-122*********fc20dede6*********a497d7225*********64' \
-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": 24.5,
"description": "Test agreement"
}
}'Response
{
"agreement_id": "22abcd1235ed497f945f755fcaba3c6c",
"agreement_uri": "https://www.mercadopago.com.ar/v1/wallet_agreement/22abcd1235ed497f945f755fcaba3c6c"
}