This endpoint allows creating an agreement 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 201.
POST
REQUIRED
REQUIRED
REQUIRED
400Request error.
RedirectUriMismatch
The redirect URI does not match the one registered for this application. Check the value sent in return_uri and confirm that it is registered in your application settings.
ReturnUriNull
The return_uri field is required and was not provided. Make the request again including it.
ExternalFlowIdTooLong
The external_flow_id value exceeds the maximum allowed length of 64 characters. Reduce the size of the identifier sent.
ReturnUriTooLong
The return_uri value exceeds the maximum allowed length of 2048 characters. Reduce the size of the URI sent.
ExternalUserNull
The external_user field is required and was not provided. Make the request again including the buyer's identifier in your system.
AgreementDataDescriptionInvalid
The agreement_data.description value is invalid. Check the content sent and respect the 256-character limit.
403Forbidden.
forbidden
You don't have permission to access the requested resource. Check whether the Access Token used has the permissions and scopes required for this operation.
500Generic error.
internal_error
An internal server error occurred. Please try again later. If the problem persists, contact support and provide the x-request-id and details about the operation performed.
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*********685765-12*********1b4332e5c*********e077d7679*********664' \
-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"
}
}'{
"agreement_id": "22abcd1235ed497f945f755fcaba3c6c",
"agreement_uri": "https://www.mercadopago.com.ar/wallet-connect/vinculation/onboarding?22abcd1235ed497f945f755fcaba3c6c"
}