Configure environment
Follow the steps below to configure the environment that will allow you to operate with Mercado Pago QR codes in acceptor flow.
1. Create business account and application in Mercado Pago
To start the configuration process, it is necessary to have a business account in Mercado Pago, which will allow you to create an application in Mercado Pago Developers.
To create your business account, visit our registration page and fill out the requested information with the details of the digital wallet you represent.
Then, go to Mercado Pago Developers, log in with the business account corresponding to the wallet, and access Your Integrations in the upper right corner of the screen.
On the next screen, click on the Create Application button.
This will redirect you to the Basic Settings screen, where you need to fill out the requested information as indicated below:
- Application Name: choose a name for the application, associated with the wallet for which you are creating it. You have a limit of 50 characters.
- As a payment solution to integrate, select In-person payments.
- When selecting the product to integrate, choose QR Code.
- It is not necessary to select the integration model.
Finally, check the box to authorize the use of your personal data according to the Privacy Statement and certify that your account uses Mercado Pago tools in accordance with the Terms and Conditions, as well as the I am not a robot checkbox, and click Create Application.
This will automatically generate a card in Your Integrations with the name and number of the application, allowing you to access its details when necessary.
2. Request registration and incorporation of the wallet
To continue with the configuration of the interoperable QR, it is necessary for the digital wallet to request registration and its incorporation into Mercado Pago.
To do this, you must contact our Help Center and request that you require support for the configuration of the interoperable QR acceptor flow, providing the following information.
Field | Description |
identifier | Commercial name of the digital wallet, as it is known in the market. |
application_id | This is the identifier of the application created for the digital wallet. You can find it as Application Number within Application Details. |
user_business_id | Identifier of the user who created the application for the digital wallet. You can find it as User ID within Application Details. |
With this information, our Support team will manage the incorporation of the wallet and will subsequently confirm its registration.
3. Obtain Credentials
To use Mercado Pago APIs, it is necessary to obtain credentials through the OAuth flow. This way, you can create an Access Token that will allow you to securely access the resources of the application created.
To obtain it, follow the steps below.
- Within Your Integrations, select the application created for the digital wallet.
- In the menu displayed on the left side of the screen, select the Production Credentials option.
- Locate the Client ID and Client Secret, which you will use to generate the Access Token via the OAuth flow, as shown in the following image.
- Send a POST request to the endpoint /oauth/token with the required parameters described below to generate your Access Token.
curl
curl --location 'https://api.mercadopago.com/oauth/token' \
--header 'Content-Type: application/json' \
--data '{
"client_id": "{CLIENT_ID}",
"client_secret": "{CLIENT_SECRET}",
"grant_type": "client_credentials"
}'
Field | Description |
client_id | Copy and paste the value assigned to the Client ID in the Credentials section within "Your Integrations." |
client_secret | Copy and paste the value assigned to the Client Secret in the Credentials section within "Your Integrations." |
grant_type | The OAuth protocol allows obtaining an Access Token through different access flows (grant types). In this case, you must fill the field with the value client_credentials , which allows you to obtain it to access your own resources. More information about this flow can be found in Get Access Token. |
In the response to your request, you will receive, among other parameters, your Access Token, which you should use in the calls to Mercado Pago APIs once you have the registration of the wallet granted by our Support team.
json
{
"access_token": "{ACCESS_TOKEN}",
"token_type": "Bearer",
"expires_in": 21600,
"scope": "offline_access read write",
"user_id": {USER_ID},
"live_mode": true
}
4. Configure Webhook Notifications (exclusive for credit card payments)
When configuring the interoperability of Mercado Pago QR Codes, it is also possible to set up Webhook notifications for credit cards payments.
To do this, follow the steps below.
- Access Your Integrations and select the application created for the digital wallet.
- In the menu displayed on the left side of the screen, select the option Notifications > Webhooks.
- In the Production Mode tab, provide the URL that will be used to receive notifications.
- In Events, choose the option Payments (credit card interoperability).
- Click on Save and confirm it on the next screen.