AI resources
Generate payer tokenhttps://api.mercadopago.com/v2/wallet_connect/agreements/{agreement_id}/payer_token
This endpoint allows generating a payment token, a unique identifier that represents the buyer's authorization for the seller to process payments from their wallet. In case of success, the request will return a response with status 200.
POST
Request parameters
Header
Authorization
Access Token obtained through the developer panel. Must be sent in all requests.string
REQUIRED
x-platform-id
Identifier for platforms or modules that offer Mercado Pago within their solutions.string
Path
agreement_id
Unique identifier of the agreement.string
REQUIRED
Body
code
Temporary authorization code obtained from the agreement callback. Used to exchange for a payer token.string
REQUIRED
Response parameters
payer_token
Token that represents the buyer's authorization for the seller to process payments from their wallet.string
Errors
400Request error.
400
Bad Request.
404Error. Resource not found.
404
Not Found.
500Processing error.
internal_error
Some error occurred on our side while attempting to process the request. Please try again later.
Request
curl -X POST \
'https://api.mercadopago.com/v2/wallet_connect/agreements/{agreement_id}/payer_token'\
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer APP_USR-5*********956537-12*********ff1a3d36d*********47e7b9985*********770' \
-H 'x-platform-id: YOUR_PLATFORM_ID' \
-d '{
"code": "aeecea3e11f2545d1e7790eb6591ff68df74c57930551ed980239f4538a7e530"
}'Response
{
"payer_token": "abcdef1e23f4567d8e9123eb6591ff68df74c57930551ed980239f4538a7e530"
}