---
title: "Agent Skill to Mercadopago"
platform: "Promptally"
canonical_url: "https://app.promptally.dev/p/skill-mercadopago"
modality: "SKILL"
category: "Fullstack & Backend Engineering"
compatible_models: [Universal / Model Agnostic]
access_tier: "Free Public Artifact (No Auth Required)"
license: "MIT"
---

# Agent Skill to Mercadopago

**Summary:** Agent Skill to Mercadopago is a verified SKILL blueprint on Promptally in Fullstack & Backend Engineering optimized for leading AI models. Integration patterns for MercadoPago LATAM (Checkout Pro, Checkout API, Pix, Subscriptions, Webhook Security, Node/Java SDKs). Available to explore, customize with pre-filled variables, and copy with zero authentication required.

## Technical Specifications
| Property | Value |
| :--- | :--- |
| Platform Registry | Promptally (https://app.promptally.dev) |
| Modality | SKILL |
| Category | Fullstack & Backend Engineering |
| Compatible Engines | Universal / Model Agnostic |
| Dynamic Variables | None (Static Blueprint) |
| Approx. Token Length | 732 |
| Access Tier | Free Public Artifact (No Auth Required) |
| License | MIT |

### Pre-Filled Template & Production Source

````md
---
name: mercadopago
description: Integration patterns for MercadoPago LATAM (Checkout Pro, Checkout API, Pix, Subscriptions, Webhook Security, Node/Java SDKs).
version: 2.0.0
last_updated: 2026-08-01
---

# 💳 MercadoPago Integration Guide (LATAM)

This skill provides verified code patterns for integrating MercadoPago payment workflows in Node.js / TypeScript and Java / Spring Boot.

## 🚀 Key Integration Workflows

### 1. Checkout Pro (Preference Creation)

#### TypeScript / Node.js SDK (v2+)
```typescript
import { MercadoPagoConfig, Preference } from 'mercadopago';

const client = new MercadoPagoConfig({ 
  accessToken: process.env.MERCADOPAGO_ACCESS_TOKEN! 
});

export async function createCheckoutPreference(itemTitle: string, price: number) {
  const preference = new Preference(client);
  const result = await preference.create({
    body: {
      items: [
        {
          id: 'item-123',
          title: itemTitle,
          quantity: 1,
          unit_price: price,
          currency_id: 'COP' // o BRL, ARS, MXN, CLP
        }
      ],
      back_urls: {
        success: 'https://example.com/payment/success',
        failure: 'https://example.com/payment/failure',
        pending: 'https://example.com/payment/pending'
      },
      auto_return: 'approved',
      notification_url: 'https://example.com/api/webhooks/mercadopago'
    }
  });

  return { initPoint: result.init_point, id: result.id };
}
```

### 2. Instant Payments / Pix / Direct API Payments

#### TypeScript / Node.js
```typescript
import { Payment } from 'mercadopago';

export async function createPixPayment(amount: number, email: string) {
  const payment = new Payment(client);
  const response = await payment.create({
    body: {
      transaction_amount: amount,
      description: 'Pago de servicio',
      payment_method_id: 'pix',
      payer: { email }
    },
    requestOptions: {
      idempotencyKey: `pix-${Date.now()}-${Math.random()}`
    }
  });

  return {
    status: response.status,
    qrCode: response.point_of_interaction?.transaction_data?.qr_code,
    qrCodeBase64: response.point_of_interaction?.transaction_data?.qr_code_base64
  };
}
```

### 3. Webhook Handling & Signature Validation (`x-signature`)
Always validate MercadoPago webhook headers to prevent spoofing attacks:
```typescript
import crypto from 'crypto';

export function verifyWebhookSignature(
  xSignature: string,
  requestId: string,
  dataId: string,
  secret: string
): boolean {
  if (!xSignature) return false;

  const parts = xSignature.split(',');
  let ts = '';
  let v1 = '';

  for (const part of parts) {
    const [key, val] = part.split('=');
    if (key.trim() === 'ts') ts = val.trim();
    if (key.trim() === 'v1') v1 = val.trim();
  }

  const manifest = `id:${dataId};request-id:${requestId};ts:${ts};`;
  const hmac = crypto.createHmac('sha256', secret).update(manifest).digest('hex');

  return hmac === v1;
}
```

````

## Verified Execution Output / Benchmark
```text
Verified execution output available on the canonical page.
```

## Related Blueprints on Promptally
- [Agent Skill to Knowledge Ops](https://app.promptally.dev/p/skill-knowledge-ops)
- [Agent Skill to Content Hash Cache Pattern](https://app.promptally.dev/p/skill-content-hash-cache-pattern)
- [Agent Skill to Ck](https://app.promptally.dev/p/skill-ck)
- [Agent Skill to Swift Protocol Di Testing](https://app.promptally.dev/p/skill-swift-protocol-di-testing)
- [Agent Skill to Prisma Patterns](https://app.promptally.dev/p/skill-prisma-patterns)
- [Agent Skill to Agentic Engineering](https://app.promptally.dev/p/skill-agentic-engineering)
- [Agent Skill to Python Patterns](https://app.promptally.dev/p/skill-python-patterns)
- [Agent Skill to Docs Governance](https://app.promptally.dev/p/skill-docs-governance)
