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

A payer token is an ID that represents the authorization the user gave to the seller.

POST

https://api.mercadopago.com/v2/wallet_connect/agreements/{agreement_id}/payer_token
Request parameters
Header
Authorization
string

REQUIRED

Access Token obtained through the developer panel. Must be sent in all requests.
x-platform-id
string
Field intended for platforms or modules that offer Mercado Pago in their solutions.
Path
agreement_id
string

REQUIRED

Unique ID that identifies an agreement.
Body
code
string

REQUIRED

This is the payer token. It is a reference to the ID that represents the authorization of the user.
Response parameters
payer_token
string
This is the payer token. It is a reference to the ID that represents the authorization of the user.
Errors

400Error

400

Bad-Request

404Error

404

Not-Found

500Error

500

Error

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-8*********932064-12*********edf6d3c99*********2236c703f*********668' \
       -H 'x-platform-id: YOUR_PLATFORM_ID' \
    -d '{
  "code": "aeecea3e11f2545d1e7790eb6591ff68df74c57930551ed980239f4538a7e530"
}'
Response
{
  "payer_token": "abcdef1e23f4567d8e9123eb6591ff68df74c57930551ed980239f4538a7e530"
}