Did you find this information useful?
Yes
No
Create Agreement/v2/wallet_connect/agreementsAn agreement is an authorization link that the buyer receives to allow the seller to access their Mercado Pago wallet to debit the payment.
POST
Products that use it:
Request's parameters
client.id
Localization: queryUnique ID that identifies a specific Clientnumber
x-platform-id
Localization: headerField intended for platforms or modules that offer Mercado Pago in their solutionsstring
agreement_data
Localization: bodyContains information about actions the user must do and the amount to be paidobject
external_flow_id
Localization: bodyIdentifies the Seller side flow current statestring
Response parameters
agreement_id
Localization: bodyUnique ID that identifies an Agreementstring
agreement_uri
Localization: bodyThis is the uri to redirect the user to the wallet linking in the frontendstring
Request
curl
curl -X POST \
'https://api.mercadopago.com/v2/wallet_connect/agreements?client.id=<CLIENT.ID>' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN \
-H 'Content-Type: application/json' \
-H 'x-platform-id: YOUR_ACCESS_TOKEN' \
-d '{
"return_url": "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"
}
}'
Answer
json
{
"agreement_id": "b1234e5678b91c23a456e78912345b67",
"agreement_uri": "https://beta.mercadopago.com.ar/v1/wallet_agreement/b1234e5678b91c23a456e78912345b67"
}
Errors
400bad_request
400
400Field external_flow_id is required
400Field return_uri must not be grater than 300 characters
400Field external_flow_id must not be grater than 300 characters
400Field external_user must not be blank
400Field id must not be blank