Home
Documentation
Resources
Partners
Community

Resources

Check for updates on our solutions and system performance, or request technical support.

Partners

Discover our program for agencies or developers that offer integration services and sellers who want to hire them.

Community

Get the latest news, ask others for help and share your knowledge.

Create payer token - Agreements - Mercado Pago Developers

Intelligent search powered by OpenAI 

Create payer token

POST

https://api.mercadopago.com/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
PATH
agreement_id
string

REQUIRED

Unique ID that identifies an agreement.
HEADER
x-platform-id
string
Field intended for platforms or modules that offer Mercado Pago in their solutions.
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 'x-platform-id: YOUR_PLATFORM_ID' \
       -H 'Authorization: Bearer TEST-4599*********755-11221*********d497ae962*********ecf8d85-1*********' \
    -d '{
  "code": "aeecea3e11f2545d1e7790eb6591ff68df74c57930551ed980239f4538a7e530"
}'
Sample answer
{
  "payer_token": "abcdef1e23f4567d8e9123eb6591ff68df74c57930551ed980239f4538a7e530"
}