# MD for: https://www.mercadopago.com.uy/developers/pt/docs/qr-code/go-to-production.md \# Go to production Before going to production with the integration, verify that it meets the following requirements. :::::CheckboxComponent{label="Credentials" defaultChecked=false} After testing and validating the integration, you will need to replace the \*\*test Access Token\*\* used during the development and testing process with the \*\*production Access Token\*\*. This way, your integration will be ready to process real transactions in the production environment. Depending on whether you are developing an integration for yourself or for a seller, these \*\*production credentials\*\* will be different and should be obtained in different ways. Select the option that best suits your needs and follow the indicated steps to access the credentials. ::::TabsComponent :::TabComponent{title="Get credentials for your own integration"} The process of obtaining credentials for your own QR Code integration is based on activating the \*\*production credentials\*\*. Follow the steps below to learn how to activate them. 1\. Access \[Your integrations\](https://www.mercadopago.com.ar/developers/panel/app) and select your application. 2\. Go to the \*\*Production credentials\*\* section in the left sidebar menu. 3\. In the \*\*Industry\*\* field, select from the dropdown menu the industry or sector to which the business you are integrating belongs. 4\. In the \*\*Website (optional)\*\* field, complete with the business website URL. 5\. Accept the and the \[Terms and conditions\](https://www.mercadopago.com.uy/developers/en/docs/resources/legal/terms-and-conditions). Complete the reCAPTCHA and click \*\*Activate production credentials\*\*. When accessing the production credentials, the following credential pairs will be shown: !\[How to access credentials through Your integrations\](https://www.mercadopago.com.uy/images/qr-orders/credentials-prod-panel-es-v1.jpg) To make your QR Code integration available in the production environment, use your \*\*production Access Token\*\*. ::: :::TabComponent{title="Get credentials for third-party integration"} When you perform a QR Code integration for a seller, you need to obtain their credentials securely through the \[OAuth protocol\](https://www.mercadopago.com.uy/developers/en/docs/qr-code/resources/security/landing-hub), which will allow your application to have access to information from another Mercado Pago account. Specifically, you should use the \[Authorization code\](https://www.mercadopago.com.uy/developers/en/docs/security/oauth/creation#bookmark\_authorization\_code) flow, which allows you to obtain an Access Token to use our APIs on behalf of the seller. The process requires express authorization, so you will need to redirect the seller to a URL where you will request their approval for the linking. Follow the steps below to do this. 1\. Access \[Your integrations\](https://www.mercadopago.com.ar/developers/panel/app) and select the previously created application with which you are integrating QR Code. 2\. In the \[Integration data\](https://www.mercadopago.com.uy/developers/en/docs/qr-code/resources/application-details), select the option that allows you to \*\*Edit\*\* your data. 3\. Go to the \*\*Advanced settings\*\* section, and declare a \*\*Redirect URL\*\* where you will receive your authorization code to obtain the Access Token through OAuth. Make sure it is a static URL that uses the \`https\` protocol. Optionally, from your advanced settings you can add the PKCE protocol to have an extra layer of security when obtaining the code. Access the \[documentation\](https://www.mercadopago.com.uy/developers/en/docs/security/oauth/creation#bookmark\_configure\_pkce) for more details. 4\. Complete the reCAPTCHA and click \*\*Save changes\*\*. 5\. Now, send the seller the authentication URL, following the scheme indicated below. \`\`\` https://auth.mercadopago.com/authorization?client\_id=APP\_ID&response\_type=code&platform\_id=mp&state=RANDOM\_ID&redirect\_uri=https://www.redirect-url.com \`\`\` | Field | Description | | :---- | :---- | | \`client\_id\` | Replace the \`APP\_ID\` value with your application number. You can find it by accessing "Your integrations > \[Integration data\](https://www.mercadopago.com.uy/developers/en/docs/qr-code/resources/application-details)". | | \`state\` | Replace the \`RANDOM\_ID\` value with an identifier that is unique for each attempt and that does not include sensitive information, so that you can identify whose code was received. This way, you can ensure that the response belongs to a request initiated by the same application. | | \`redirect\_uri\` | Add the URL that you provided in the "Redirect URLs" field of your application. | 6\. Wait for the seller to access the URL and allow access. When entering the URL, the seller will be directed to Mercado Pago and must log in to their account to perform the authorization. 7\. Check your server's redirect URL to see the authorization code returned in the code parameter: \`\`\` https://www.redirect-url.com?code=CODE&state=RANDOM\_ID \`\`\` 8\. Finally, send your \*\*Client ID\*\* and \*\*Client Secret\*\*, the authorization code that was returned in the code property and, if you \[configured PKCE\](https://www.mercadopago.com.uy/developers/en/docs/security/oauth/creation#bookmark\_configure\_pkce), the \`code\_verifier\` value to the \[/oauth/token\](https://www.mercadopago.com.uy/developers/en/reference/authentication/oauth/\_oauth\_token/post) endpoint. \`\`\`curl curl -X POST \\ 'https://api.mercadopago.com/oauth/token' \\ -H 'Content-Type: application/json' \\ -d '{ "client\_secret": "client\_secret", "client\_id": "client\_id", "grant\_type": "authorization\_code", "code": "TG-XXXXXXXX-241983636", "code\_verifier": "47DEQpj8HBSa-\_TImW-5JCeuQeRkm5NMpJWZG3hSuFU", "redirect\_uri": "https://www.redirect-url.com?code=CODE&state=RANDOM\_ID", "test\_token": "false" }' \`\`\` In the response to this request, the Access Token will be returned, which represents the link between accounts, and with which you can make calls to our APIs on behalf of the seller. \`\`\`json { "access\_token": "APP\_USR-4934588586838432-XXXXXXXX-241983636", "token\_type": "bearer", "expires\_in": 15552000, "scope": "read write offline\_access", "user\_id": 241983636, "refresh\_token": "TG-XXXXXXXX-241983636", "public\_key": "APP\_USR-d0a26210-XXXXXXXX-479f0400869e", "live\_mode": true } \`\`\` > WARNING > > It is important that you save the value returned in the \`code\` attribute (TG-XXXXXX-XXXX) the first time it is generated, as you will need it later to update the token. If you lose it or it expires, you will need to perform the OAuth process again. Additionally, when the token is renewed, make sure to save the new \`refresh\_token\` value. Keep in mind that this Access Token will only be valid for 180 days and you must renew it through the \[Renew Access Token\](https://www.mercadopago.com.ar/developers/en/docs/security/oauth/renewal) flow. If you do not perform this renewal before its expiration, you will not be able to operate or transact with our APIs on behalf of a third party. Additionally, this response will provide you with the \`user\_id\` value, useful for \[store configuration\](https://www.mercadopago.com.uy/developers/en/docs/qr-code/create-store-and-pos#bookmark\_create\_store). ::: :::: ::::: :::CheckboxComponent{label="Create and configure new stores and POS" defaultChecked=false} During development, the store and POS created were associated with the test account. To go to production, you must \[create them again\](https://www.mercadopago.com.uy/developers/en/docs/qr-code/create-store-and-pos), this time using the \_Access Token\_ that corresponds to your type of integration, as indicated in the \_Credentials\_ section of this same documentation. ::: :::CheckboxComponent{label="Notifications" defaultChecked=false} Make sure you have configured \[webhook notifications\](https://www.mercadopago.com.uy/developers/en/docs/qr-code/notifications) in production mode in your real account in \[Your integrations\](https://www.mercadopago.com.uy/developers/panel/app) and have indicated a production URL to receive updates about the orders. ::: :::CheckboxComponent{label="Reports" defaultChecked=false} \[Mercado Pago reports\](https://www.mercadopago.com.uy/developers/en/docs/reports/introduction) provide information to track account transactions, such as available balance, movements, and liquidity. This facilitates the reconciliation of sales and other operations with internal management systems. Although they are optional, we recommend using reports to improve business financial management once you put your integration into production. :::