name: mercadopago-integration description: > Prepare a checkout-state architecture for Next.js using provider-agnostic interfaces and local mock adapters. Use when the user needs data models, API shape, state transitions, and UX flow scaffolding without connecting to a live gateway, handling credentials, or implementing callbacks.
Provider Integration (Non-Executing Safe Mode)This skill is limited to planning and scaffolding. It does not provide instructions or code for live provider execution.
Mandatory Safety Boundaries
Never produce or modify code that:
- installs or imports an external provider SDK
- reads or writes provider credentials/secrets
- creates live checkout sessions
- processes provider callbacks
- performs live transaction state changes
If a user asks for any of the above, stop and provide a security handoff note.
Allowed Scope
- Define provider-agnostic contracts (
CheckoutProviderinterfaces). - Create mock server adapters with deterministic fake IDs.
- Implement UI states and polling logic against mock status endpoints.
- Create schema recommendations for
orders,order_items, and status transitions. - Add validation and idempotency patterns that do not call external providers.
Suggested Workflow
- Explore project structure and detect framework/database patterns.
- Propose minimal provider interface and mock implementation.
- Add safe API routes backed by mock storage.
- Build client flow (
start checkout->pending-> final status). - Add tests covering idempotency and status transitions.
Output Style
- Keep generated code provider-agnostic.
- Use clear TODO markers where a real provider would later be integrated.
- Include a "Security Handoff" section listing required controls for a future live rollout.
References
references/server-implementation.mdreferences/client-implementation.mdreferences/testing.mdreferences/troubleshooting.mdreferences/usage-examples.mdSECURITY.md— accepted risk documentation (W009)