Home
Documentation
Resources
Partners
Community

Resources

Check for updates on our solutions and system performance, or request technical support.

Partners

Discover our program for agencies or developers that offer integration services and sellers who want to hire them.

Community

Get the latest news, ask others for help and share your knowledge.

Create agreement - Agreements - Mercado Pago Developers

Intelligent search powered by OpenAI 

Create agreement

POST

https://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.
Request's parameters
QUERY
client.id
number
Unique ID that identifies a specific client.
HEADER
x-platform-id
string
Field intended for platforms or modules that offer Mercado Pago in their solutions.
BODY
return_uri
string
URL that redirects the user back to the sellers site.
external_flow_id
string
Identifies the Seller side flow current state.
external_user
object
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.
agreement_data
object
Contains information about actions the user must do and the amount to be paid.
Response parameters
agreement_id
string
Unique ID that identifies an agreement.
agreement_uri
string
Esto es el uri para redirigir al usuario al enlace de la billetera en el frontend. .
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 'x-platform-id: YOUR_PLATFORM_ID' \
       -H 'Authorization: Bearer TEST-4599*********755-11221*********d497ae962*********ecf8d85-1*********' \
    -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"
  }
}'
Sample answer
{
  "agreement_id": "22abcd1235ed497f945f755fcaba3c6c",
  "agreement_uri": "https://wwww.mercadopago.com.ar/v1/wallet_agreement/22abcd1235ed497f945f755fcaba3c6c"
}