# MD for: https://www.mercadopago.com.ar/developers/en/docs/mp-plugin/use-cases.md \# Use cases The plugin ensures that common developer tasks are completed directly and efficiently. Below, explore the main use cases to implement in your integration. :::AccordionComponent{title="Integrate a payment product"} The \`/mp-integrate\` command is the main entry point of the plugin for completing an integration through AI agents. Through a conversational interaction, it automatically detects the product and country mentioned in your message and generates the necessary integration code, without requiring you to search for documentation. You can build integration flows for the seven countries where Mercado Pago operates (Argentina, Brazil, Mexico, Chile, Colombia, Peru, and Uruguay), and for the main integrable products, such as Checkout API, Checkout Pro, Código QR, and Mercado Pago Point. To get started, run the command followed by a description of what you need to integrate. The more context you include, the more specific the code you receive. Some examples: \`\`\` /mp-integrate I want to integrate Checkout Pro in Brazil \`\`\` \`\`\` /mp-integrate I need to accept QR Code payments in Brazil for my retail app \`\`\` \`\`\` /mp-integrate how do I add monthly subscriptions for my users in Mexico \`\`\` When execution finishes, the plugin delivers: - \*\*Integration code\*\*: implementation adapted to the language or framework you indicated in the command. You can request versions in other languages within the same session. - \*\*Configuration snippets\*\*: SDK initialization or API call structure for the selected product. - \*\*Payload examples\*\*: request bodies with the relevant parameters for the product and country. - \*\*Parameter guidance\*\*: indication of which fields are required or optional, with example values. > NOTE > > If you mention the product and the country in the same message, the plugin does not interrupt the flow to ask for them again. Detection is automatic and immediate. \`/mp-integrate\` works in two distinct modes depending on your session's authentication state: | Mode | Data source | Allowed actions | |---|---|---| | Offline mode (No authentication) | Mercado Pago public documentation | Explore the API and prototype integrations without configured credentials. | | Online mode (after authenticating via \`/mp-connect\`) | Official MCP Server (\`mcp.mercadopago.com\`) in real time | List and create applications, obtain credentials, generate test users with balance, configure Webhooks and notifications, and carry out certification using real account data. | ::: :::AccordionComponent{title="Configure and monitor Webhook notifications"} The \`/mp-webhooks\` command lets you configure, simulate, and diagnose Mercado Pago Webhook notifications within your AI agent session. To use it, you must authenticate through \`/mp-connect\`. > NOTE > > The subcommands \`/mp-webhooks configure\`, \`/mp-webhooks status\`, \`/mp-webhooks simulate\`, and \`/mp-webhooks diagnose\` require an active session. Run \`/mp-connect\` before using any of them. You can run the following subcommands: \* \`/mp-webhooks configure\`: registers your endpoint's HTTPS URL and the event topics you want to receive, such as \`order\`, \`topic\_claims\_integration\_wh\`, or \`topic\_chargebacks\_wh\`. \* \`/mp-webhooks simulate\`: sends a test notification to the configured endpoint to validate that the HMAC-SHA256 signature is being processed correctly. \* \`/mp-webhooks status\`: checks the registration status and identifies URL or topic issues. \* \`/mp-webhooks diagnose\`: diagnoses signature and delivery failures. > WARNING > > Validating the HMAC-SHA256 signature is essential to guarantee the authenticity of the notification received. Always validate the signature before processing the event, to ensure that only legitimate notifications are handled by your integration. ::: :::AccordionComponent{title="Set up a test environment"} The plugin covers both steps to prepare your test environment: getting test cards with \`/mp-test-cards\` and creating users with balance with \`/mp-test-setup\`. Start by running \`/mp-test-cards\` to get the test cards available for your country. This command does not require authentication. \`\`\` /mp-test-cards \`\`\` In the test payment form, the cardholder name determines the simulation result, so follow the pattern of \`APRO\` (approved), \`FUND\` (insufficient funds), \`CONT\` (pending), \`SECU\` (invalid CVV), and \`EXPI\` (expired card). In the DNI field, use document number \`12345678\`. After configuring your test cards, run the \`/mp-test-setup\` command to create a seller and a buyer user with test credentials and available balance. This command only works after \[OAuth\](https://www.mercadopago.com.ar/developers/en/docs/security/oauth) authentication (\`/mp-connect\`). \`\`\` /mp-test-setup \`\`\` The expected outcome is having your users available to start testing. > NOTE > > Test cards are valid only in the sandbox environment and do not process real charges, so they must be used solely to simulate payments and never in a production environment. ::: :::AccordionComponent{title="Review and measure integration quality"} The \`/mp-review\` command analyzes your integration's code against a quality \_checklist\_ and a \*\*9-criteria Mercado Pago minimum security standard to generate an implementation report with suggested actions to improve your development\*\*. This command requires an active session, so run \`/mp-connect\` before using it. The implementation report is organized into 5 sections: 1\. \*\*Verified\*\*: \_checklist\_ items already implemented correctly. 2\. \*\*Needs attention\*\*: partial implementations that need adjustments. 3\. \*\*Blockers\*\*: critical issues that prevent going to production. 4\. \*\*Next steps\*\*: optional improvements to raise your integration's quality. 5\. \*\*Score and verdict\*\*: final result, whether approved, approved with remarks, or blocked. \`/mp-review\` also detects :toolTipComponent\[\_Access Tokens\_\]{content="Private key of the application, used in the backend to authenticate calls to the Mercado Pago API. You can access it under \*Your integrations\* > \*Application details\* > \*Credentials\*."} exposed in the source code and identifies direct calls to the \`/v1/payments\` endpoint that could benefit from migrating to the Orders API. > WARNING > > For security reasons, never write your \_Access Token\_ directly in code. Use environment variables and keep the \`.env\` file out of version control. ::: :::AccordionComponent{title="Migrate in-person payment integrations to the Orders API"} \`/mp-integrate migrate\` scans the project, identifies legacy Payment Intent API patterns from Mercado Pago Point and/or Código QR, and generates the \`migration-proposal.md\` file with a complete breakdown of the changes and the migration instructions for the Orders API. > NOTE > > This command is available starting from version 4.3.0 of the Mercado Pago plugin. Check the installed version by running \`claude plugin list\` before using it. The migration proposal file covers the main points for adapting to the Orders API, such as: \* \`state\` field to \`status\`; \* \`merchant\_order\` and \`point\_integration\_wh\` notification topics to \`orders\`; \* \`external\_reference\` field with hyphens; \* Removal of the \`X-Allow-Cancelable-Status\` header; \* Inclusion of \`MP\_WEBHOOK\_SECRET\` in \`.env.example\`. After reviewing and applying the proposed changes, run \`/mp-review\` to validate that the migrated integration meets the quality \_checklist\_ before going to production. ::: For the full reference of all available commands, see the \[Plugin commands\](https://www.mercadopago.com.ar/developers/en/docs/mp-plugin/commands) section.