# Generate 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** `/v2/wallet_connect/agreements/{agreement_id}/payer_token` ## Request parameters ### Header - `x-platform-id` (string, optional) Identifier for platforms or modules that offer Mercado Pago within their solutions. ### Path - `agreement_id` (string, required) Unique identifier of the agreement. - `code` (string, optional) Temporary authorization code obtained from the agreement callback. Used to exchange for a payer token. ## Response parameters - `payer_token` (string, optional) Token that represents the buyer's authorization for the seller to process payments from their wallet. ## Errors | Status | Error | Description | | ------- | ------- | ----------- | | 400 | 400 | Bad Request. | | 404 | 404 | Not Found. | | 500 | internal_error | Some error occurred on our side while attempting to process the request. Please try again later. | ## Request example ### cURL ```bash curl -X POST \ 'https://api.mercadopago.com/v2/wallet_connect/agreements/{agreement_id}/payer_token' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -d '{ "code": "aeecea3e11f2545d1e7790eb6591ff68df74c57930551ed980239f4538a7e530" }' ``` ## Response example ```json { "payer_token": "abcdef1e23f4567d8e9123eb6591ff68df74c57930551ed980239f4538a7e530" } ```