# MD for: https://www.mercadopago.cl/developers/pt/docs/smartapps/create-application.md \# Create application \*\*Applications\*\* are registered entities within Mercado Pago that act as a unique identifier for managing the authentication and authorization of your integrations. They represent the link between your development and Mercado Pago and constitute the first stage in carrying out the integration. To create an application, you have three options available: with an AI agent from your code editor, with the Mercado Pago Developers Assistant, or manually from the integration Panel. !\[Three options to create an application\](/images/snippets/create-application/new-create-app-onboarding-es.png) :::::TabsComponent ::::TabComponent{title="Create with AI"} You can use our AI resources to create your application from your IDE or agent in 2 steps. The agent will take care of creating the application in the integration panel and guiding you through the entire configuration. !\[Installing the Mercado Pago plugin\](/images/snippets/create-application/new-create-app-ia-v2-es.png) To do this, you have two options: installing the \[Mercado Pago Plugin\](https://www.mercadopago.cl/developers/en/docs/mp-plugin/overview), available for Claude Code and Codex, or configuring the \[Mercado Pago MCP Server\](https://www.mercadopago.cl/developers/en/docs/mcp-server/overview), available for editors such as VS Code and Cursor. Follow the instructions for the option you choose. :::AccordionComponent{title="Plugin"} ### Claude Code Run the following command to install the Mercado Pago plugin for Claude Code. \`\`\`bash claude plugin install mercadopago@claude-plugins-official \`\`\` Once installed, run the \`/mp-connect\` command to authorize the agent's access to your Mercado Pago account. ### Codex Run the following commands to install the Mercado Pago plugin for Codex. \`\`\`bash codex plugin marketplace add mercadopago/mercadopago-codex-marketplace codex plugin add mercadopago@mercadopago-codex-marketplace \`\`\` Once installed, run the \`/mp-connect\` command to authorize the agent's access to your Mercado Pago account. ::: :::AccordionComponent{title="MCP"} ### VS Code Add the following configuration to your \`mcp.json\` file. \`\`\`json { "mcp": { "servers": { "mercadopago-mcp-server": { "type": "http", "url": "https://mcp.mercadopago.com/mcp" } } } } \`\`\` ### Cursor Add the following configuration to your \`mcp.json\` file. \`\`\`json { "mcpServers": { "mercadopago-mcp-server": { "url": "https://mcp.mercadopago.com/mcp" } } } \`\`\` ::: Finally, ask the agent to create your application in Mercado Pago. If you'd like, you can copy and paste the following prompt. \`\`\` I want to integrate with Mercado Pago. Recommend the ideal payment solution for my project, create the application, and guide me through the integration. \`\`\` > NOTE > > You can complete the integration with AI support. If you need help, check the \[Integrate with AI guide\](https://www.mercadopago.cl/developers/en/docs/ai-resources). :::: ::::TabComponent{title="Create with the Assistant"} You can use the Mercado Pago Developers Assistant to create your application conversationally and easily, without navigating through forms. To do this, go to \[Mercado Pago Developers\](https://www.mercadopago.cl/developers) and log in with your account. In the bottom right corner of the screen, you'll see the \*\*Assistant\*\* widget. Click to open it. From there, you can simply ask the Assistant to create your application conversationally. The Assistant will ask you to provide a series of details to complete the setup: - \*\*Application name\*\*: provide a name that lets you identify your integration. It accepts a maximum of 100 characters. - \*\*Product to integrate\*\*: the Assistant will show you a list of all Mercado Pago payment solutions to choose from. When the Assistant confirms your application has been created, it will show you the \*\*App ID\*\*, \*\*Product ID\*\*, and \*\*integration type\*\*, if applicable. > NOTE > > Once your application is created, the Assistant can help you obtain test credentials, production credentials, or configure webhooks, as well as suggest how to carry out your integration based on your stack. :::: ::::TabComponent{title="Create manually"} If you prefer, you can create your application manually from the integration Panel by following the steps below. !\[Mercado Pago Developers panel\](/images/snippets/create-application/new-create-app-panel1-smartapps-es.png) 1\. Go to \[Mercado Pago Developers\](https://www.mercadopago.cl/developers) with your Mercado Pago account. 2\. On the home screen, select the \*\*Create in the integration panel\*\* option. > NOTE > > If you already have applications created, go to \*\*Your integrations\*\* and click \*\*Create application\*\*. 3\. In \*\*Choose a solution to integrate\*\*, select \*\*SmartApp\*\*. 4\. In \*\*Other information\*\*: - \*\*Application name\*\*: enter a name that lets you identify it. - \*\*Store URL\*\*: enter your store's URL. 5\. Accept the \[Privacy Statement\](https://www.mercadopago.cl/privacidad) and the \[Terms and Conditions\](https://www.mercadopago.cl/developers/en/docs/resources/legal/terms-and-conditions) and click \*\*Create application\*\*. !\[Application creation form (SmartApp)\](/images/snippets/create-application/new-create-app-panel2-smartapps-es.png) :::: ::::: In \[Your integrations\](https://www.mercadopago.cl/developers/panel/app), you can view the list of all your created applications and access the \[Integration data\](https://www.mercadopago.cl/developers/en/docs/smartapps/resources/application-details) of each one. > NOTE > > If necessary, you can edit or delete an application. In the latter case, keep in mind that your store will stop using our resources or receiving payments through the Mercado Pago integration associated with that application. For more information, access \[Integration data\](https://www.mercadopago.cl/developers/en/docs/smartapps/resources/application-details). ## Access credentials After creating your application, you will need to access the :toolTipComponent\[credentials\]{link="/developers/en/docs/smartapps/resources/credentials" linkText="Credentials" content="Access keys linked to an application that identify and authenticate a Mercado Pago integration."} necessary to continue with the integration process. Depending on whether you are doing your own integration or for a seller, these credentials will be different and obtained in different ways. - \*\*Get credentials for own terminal integration:\*\* to integrate your company's own business management applications (SmartApps) to Mercado Pago's Point Smart, you will need to access your application's production credentials, which can be activated in \[Your integrations\](https://www.mercadopago.cl/developers/panel/app). - \*\*Get credentials for a third-part integration:\*\* to integrate third-party business management applications (SmartApps) to Mercado Pago's Point Smart, you will need to obtain credentials through the :toolTipComponent\[OAuth\]{link="/developers/en/docs/smartapps/resources/security/landing-hub" linkText="OAuth" content="Private key generated through the OAuth security protocol, which allows managing integrations on behalf of third parties. For more information, access the documentation."} security protocol. Select the option that best suits your needs and follow the indicated steps to access the credentials. ::::TabsComponent :::TabComponent{title="Get credentials for own terminal integration"} The process of obtaining credentials for your own SmartApps integration to the Point terminal is based on activating your :toolTipComponent\[production credentials\]{content="Access keys linked to an application and used to process real operations. You can find them in the application's Credentials section, within the production environment. Use the Public Key in the \_frontend\_ and the Access Token in the \_backend\_."}. Follow the steps below to learn how to activate them. 1\. Access \[Your integrations\](https://www.mercadopago.cl/developers/panel/app) and select an application. 2\. Go to the \*\*Production credentials\*\* section in the left sidebar menu. In the \*\*Industry\*\* field, select the industry or sector to which the business you are integrating belongs from the dropdown menu. 3\. In the \*\*Website (required)\*\* field, fill in the URL of your business website. 4\. Accept the and the \[Terms and Conditions\](https://www.mercadopago.cl/developers/en/docs/resources/legal/terms-and-conditions). Fill in the reCAPTCHA and click \*\*Activate production credentials\*\*. When accessing production credentials, the following credential pairs will be displayed: !\[Cómo acceder a las credenciales a través de Tus Integraciones\](/images/snippets/credentials-prod-panel-es-v2.jpg) To integrate SmartApps with the Point terminal, you will need your :toolTipComponent\[Access Token\]{content="Private key used in the \_backend\_ to authenticate requests to Mercado Pago APIs. It must never be shared or exposed in the \_frontend\_."}—which is used for creating stores and cashiers, and later for the association to the Point terminal (performed by the Mercado Pago team). Additionally, use your :toolTipComponent\[Client ID\]{content="Public identifier for an application, used together with the Client Secret in OAuth authorization flows."} to identify transactions. ::: :::TabComponent{title="Get credentials for a third-part integration"} If the SmartApps integration will be used on Point terminals linked to accounts different from that of the integrator responsible for the application, the users of those accounts must be granted permission to access the application, so that they can view information or perform operations. For this, access must be granted through the \[OAuth\](https://www.mercadopago.cl/developers/en/docs/smartapps/resources/security/landing-hub) protocol, using the \[Authorization code\](https://www.mercadopago.cl/developers/en/docs/security/oauth/creation#bookmark\_authorization\_code) flow, which generates an Access Token for use of the APIs on behalf of third parties. This process requires authorization from the account owner through an approval URL. 1\. Access \[Your integrations\](https://www.mercadopago.cl/developers/panel/app) and select the previously created application with which you are integrating your SmartApp. 2\. In \[Integration data\](https://www.mercadopago.cl/developers/en/docs/smartapps/resources/application-details), select the option to \*\*Edit\*\* your data. 3\. Go to the \*\*Advanced settings\*\* section and declare a \*\*Redirect URL\*\* where you will receive the authorization code to obtain the Access Token via OAuth. Make sure it is a static URL and uses the \`https\` protocol. > SUCCESS\_MESSAGE > > Optionally, in your advanced settings, you can add the PKCE protocol for an extra layer of security when obtaining the code. Access \[the documentation\](https://www.mercadopago.cl/developers/en/docs/security/oauth/creation#bookmark\_configurar\_pkce) for more details. 4\. Complete the reCAPTCHA and click \*\*Save changes\*\*. 5\. Now, send the seller the authentication URL following the scheme below. \`\`\`url 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 "APP\_ID" with your application number. You can find it in Your integrations > \[Integration data\](https://www.mercadopago.cl/developers/en/docs/smartapps/resources/application-details). | | \`state\` | Replace "RANDOM\_ID" with a unique identifier per attempt that does not contain sensitive information. This will help validate that the response belongs to your request. | | \`redirect\_uri\`| Enter the same URL that you declared in the "Redirect URLs" field of your application. | 6\. When the application owner accesses this URL and authorizes access, they will be redirected to Mercado Pago to log in and confirm authorization. 7\. Verify that the code was returned correctly in the \`code\` parameter of the redirect URL. This code will be valid for 10 minutes and, after this period, it will expire and it will be necessary for the seller to access the URL again and make a new authorization for a new code to arrive. \`\`\`url https://www.redirect-url.com?code=CODE&state=RANDOM\_ID \`\`\` 8\. Finally, send your \*\*Client ID and Client Secret\*\*, the authorization code returned in the \`code\` property and, if you have \[configured PKCE\](https://www.mercadopago.cl/developers/en/docs/security/oauth/creation#bookmark\_configurar\_pkce), the \`code\_verifier\` value to the :TagComponent{tag="API" text="/oauth/token" href="/developers/en/reference/authentication/oauth/\_oauth\_token/post" color="accent"} 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 the accounts, and with which you can make calls to our APIs on behalf of the application owner. \`\`\`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 > > This Access Token is valid for 180 days. You must renew it using the \[Renew Access Token\](https://www.mercadopago.cl/developers/en/docs/security/oauth/renewal) flow. If you do not renew it before expiration, it will not be possible to operate or perform transactions with our APIs. ::: :::: This response will also provide the \`user\_id\` value, which will be useful during the configuration of the terminals by the Mercado Pago team.