Create agreement - Agreements - Mercado Pago Developers
Which documentation are you looking for?

Do not know how to start integrating? 

Check the first steps
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
agreement_data
object
Contains information about actions the user must do and the amount to be paid
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.
return_url
string
URL that redirects the user back to the sellers site
Response parameters
agreement_id
string
Unique ID that identifies an Agreement
agreement_uri
string
This is the uri to redirect the user to the wallet linking in the frontend
Errors

400Error

400

Bad-Request

400

Bad-Request

400

Bad-Request

400

Bad-Request

400

Bad-Request

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_ACCESS_TOKEN' \,
       -H 'Authorization: Bearer TEST-3322*********190-03031*********46528954c*********0339910-1*********' \
       -d '{
  "agreement_data": {
    "validation_amount": 3.14,
    "description": "Test agreement"
  },
  "external_flow_id": "EXTERNAL_FLOW_ID",
  "external_user": {
    "id": "usertest",
    "description": "Test account"
  },
  "return_url": "https://www.mercadopago.com/"
}'
Sample answer
{
  "agreement_id": "b1234e5678b91c23a456e78912345b67",
  "agreement_uri": "https://beta.mercadopago.com.ar/v1/wallet_agreement/b1234e5678b91c23a456e78912345b67"
}