- Cuenta en Mercado Pago con aplicación activa.
- Haber realizado la conexión con Mercado Pago MCP Server.
Configurar, implementar y validar la recepción de notificaciones Webhooks de Mercado Pago
Este prompt utiliza el MCP Server de Mercado Pago para configurar tus notificaciones Webhooks y validar su recepción, incluyendo la asistencia en la implementación de un receptor.
Requisitos
Prompt
## CONTEXT You are developing an integration with Mercado Pago and need to **configure, implement, and validate webhook notifications for payment events**. The goal is to obtain a **complete, end-to-end testing guide**, covering everything from technical requirements to implementation, configuration, and validation of webhook notifications under real testing conditions. --- ## ROLE Act as a **Senior Technical Integrator and documentation-driven code generator**. All outputs must strictly follow the **official Mercado Pago Developers documentation** and SDKs. Prefer accuracy, traceability, and explicit assumptions over simplifications. --- ## OBJECTIVE Generate a structured, end-to-end guide that enables an engineer to: 1. Understand the official requirements for receiving Mercado Pago webhook notifications. 2. Implement a secure and functional notification receiver. 3. Configure Mercado Pago to send payment notifications to a test endpoint. 4. Validate, through simulation, that notifications are received and processed correctly. --- ## SCOPE OF THE TASK Your response must include the following sections: --- ## 1. WEBHOOK REQUIREMENTS AND SECURITY - Identify and describe the **technical and security requirements** that a webhook receiver must meet, according to official Mercado Pago documentation. - Include (if applicable): - HTTPS requirements - Authentication and signature validation - Expected headers and payload structure - Retry behavior and idempotency considerations - Clearly distinguish **test vs. production** requirements. --- ## 2. NOTIFICATION RECEIVER IMPLEMENTATION - Based on the official requirements, generate a **functional implementation example** of a webhook receiver. - Adapt the example to a common integrator stack (choose one if not specified): - Node.js (Express), Python (FastAPI), or Java (Spring Boot). - The implementation must include: - An HTTP endpoint to receive notifications - Raw body handling (if required for signature validation) - Signature/authenticity verification - Basic idempotency handling - Logging and error handling - Clearly mark where secrets, URLs, or environment-specific values must be replaced. --- ## 3. WEBHOOK CONFIGURATION IN MERCADO PAGO - **Configure Mercado Pago webhook notifications for payment events**, using Mercado Pago MCP Server. - Specify: - `<NOTIFICATION URL>` - `<TOPICS>` If this information is not sent, ask for it. --- ## 4. PAYMENT EVENT SIMULATION AND VALIDATION - **Simulate an event** using official Mercado Pago MCP Server. - Validate the received notification using the notification receiver. --- ## CONSTRAINTS AND GUARDRAILS - Do **not** invent endpoints, payload fields, headers, or business logic. - If documentation is ambiguous or incomplete: - Explicitly state the limitation. - Reference the closest official documentation section or alternative. - All examples must be consistent with official Mercado Pago documentation and clearly labeled as **examples**, not production-ready code. --- ## EXPECTED OUTPUT The final output must be: - Well-structured and clearly sectioned - Technically precise and traceable to official documentation - Suitable as a **reference guide for real integration testing** - Complete and uninterrupted (do not ask follow-up questions) - Expected payload sample and how to validate signature and processing logic. - Post-conditions and verification checks (status updates, database entries, webhook retries). ## FAILURE MODES & MITIGATIONS - Invalid signature, retries, duplicate notifications. - **Explicit gaps**: if any required detail is not present in official docs, call it out and provide the nearest verifiable alternative with references. ## CONSTRAINTS & GUARDRAILS - **Do NOT invent** endpoints, payload fields, signature algorithms, or behaviors not present in official Mercado Pago documentation. - Use **test** credentials and sandbox resources for all examples. Explicitly label anything that would be used in production. - The receiver **must be implemented in the integrator's stack** (no external MCP usage). - All code samples must be explicit about required SDK versions and include comments linking to the exact official documentation sections used. - If the docs differ by country or SDK, note the differences and which variant the example targets. --- ## FORMAT Return the result as a structured guide with headings, code blocks, and a final concise checklist that an engineer can follow to implement, configure, and validate the webhook receiver in a test environment. --- ## NO QUESTIONS Do not ask follow-up questions. Make reasonable assumptions where necessary (state them) and produce the full guide end-to-end. --- ## Professional Statement This assistant provides guidance and automated integration **based exclusively on the official Mercado Pago documentation and resources valid at the time of execution**. **It DOES NOT guarantee perfect integration. Every output must be manually validated and tested before a production rollout.** The final responsibility for testing, QA, and deployment lies with the project's technical team.
