# MD for: https://www.mercadopago.com.br/developers/pt/docs/wallet-connect-legacy/account-linking-flow/create-payer-token.md \# Generate payer token After the agreement creation and the buyer's approval, you must generate the payer token. The \`payer\_token\` is responsible for storing the buyer's data and ensuring the security of the transaction, it is also a mandatory attribute for creating transactions throughout the validity period of the agreement previously created. Check out the diagram below that illustrates how the token generation flow works. !\[Create payer token\](/images/wallet-connect/create-payer-token-v2-en.png) To generate a \`payer\_token\`, send a \*\*POST\*\* with all necessary attributes to the endpoint \[/v2/wallet\_connect/agreements/{agreement\_id}/payer\_token\](https://www.mercadopago.com.br/developers/en/reference/wallet\_connect/\_wallet\_connect\_agreements\_agreement\_id\_payer\_token/post) and execute the request. To perform these tests, send the following request to the :TagComponent{tag="API" text="/v2/wallet\_connect/agreements/{agreement\_id}/payer\_token" href="/developers/en/reference/online-payments/wallet-connect/generate-payer-token/post"} endpoint, along with your :toolTipComponent\[test Access Token\]{content="Private key linked to an application, used in the \_backend\_ to authenticate operations in the test environment. You can find it in the application's Credentials section, within the test environment. It cannot process real payments and must never be exposed in the \_frontend\_."}. \`\`\`curl curl -X POST \\ 'https://api.mercadopago.com/v2/wallet\_connect/agreements//payer\_token'\\ -H 'Content-Type: application/json' \\ -H 'x-platform-id: YOUR\_PLATFORM\_ID' \\ -H 'Authorization: Bearer TEST-3322\*\*\*\*\*\*\*\*\*190-03031\*\*\*\*\*\*\*\*\*46528954c\*\*\*\*\*\*\*\*\*0339910-1\*\*\*\*\*\*\*\*\*' \\ -d '{ "code": "aeecea3e11f2545d1e7790eb6591ff68df74c57930551ed980239f4538a7e530" }' \`\`\` If the execution is successful, you will receive as response a \`status code 200\`, indicating that the transaction was accepted, as shown in the following example. \`\`\`json { "payer\_token": "abcdef1e23f4567d8e9123eb6591ff68df74c57930551ed980239f4538a7e530" } \`\`\` With the \`payer\_token\` generated, the account integration flow with Wallet Connect will have been successfully completed. Go to the \[Payments\](https://www.mercadopago.com.br/developers/en/docs/wallet-connect/advanced-payments) section to perform the payment flow.