AI resources
Create agreement

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

https://api.mercadopago.com/v2/wallet_connect/agreements
Request parameters
Header
Authorization
string

REQUIRED

Access Token obtained through the developer panel. Must be sent in all requests.
x-platform-id
string
Identifier for platforms or modules that offer Mercado Pago within their solutions.
Query
client.id
number
Unique identifier of the client application.
Body
return_uri
string
URI to redirect the buyer after the agreement flow is completed.
external_flow_id
string
Seller's internal identifier for the current flow state.
external_user
object
Data used by the seller to identify the buyer within their own system.
agreement_data
object
Additional data about the agreement, including optional amount and description.
Response parameters
agreement_id
string
Unique identifier of the agreement.
agreement_uri
string
URI to redirect the buyer to complete the wallet linking in the frontend.
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-1*********550113-12*********b4773884a*********e8df16347*********786' \
       -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"
}