Create payer token - Agreements - Mercado Pago Developers
Create payer token

POST

/v2/wallet_connect/agreements/{agreement_id}/payer_token
A payer token is an ID that represents the authorization the user gave to the seller.
Request's parameters
agreement_id

REQUIRED

string
Localization: pathUnique ID that identifies an Agreement
client.id

REQUIRED

number
Localization: queryUnique ID that identifies a specific Client
caller.id

REQUIRED

number
Localization: queryUnique ID that identifies a specific Caller
x-platform-id
string
Localization: headerField intended for platforms or modules that offer Mercado Pago in their solutions
Response parameters
payer_token
string
Localization: bodyThis is the token of the payer.
Request
curl
curl -X POST \
      'https://api.mercadopago.com/v2/wallet_connect/agreements/{agreement_id}/payer_token?client.id=1451895580758649&caller.id=832564722' \
      -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
      -H 'Content-Type: application/json' \ 
      -d '{
  "code": "aeecea3e11f2545d1e7790eb6591ff68df74c57930551ed980239f4538a7e530"
}'
Answer
json
{
  "payer_token": "abcdef1e23f4567d8e9123eb6591ff68df74c57930551ed980239f4538a7e530"
}
Errors
400bad_request
400Parameter agreement_id is required
400Parameter agreementId has more than 32 characters
400Parameter agreement_id must be an alfanumeric value
400Invalid value for back_url. Must be a valid URL
400Parameter client.id must be a valid id
400Parameter caller.id must be a valid id
404bad_request
404The agreement_id does not exist
404The client.id does not exist
404The caller.id does not exist
500bad_request
500Internal server error