Agent Skill to Mercadopago
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
| Specification | Value |
|---|---|
| Artifact type | SKILL (Fullstack & Backend Engineering) |
| Compatible engines | Universal / Model Agnostic |
| Input variables | None (pre-filled) |
| Approximate tokens | 732 |
| Source file | SKILL.md |
| Access tier | Free public (MIT) |
Pre-Filled Template
---
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;
}
```
How to use this skill
- Review the pre-filled example and source files above.
- Copy the template or download
SKILL.md, then use it in your model, IDE, or workflow tool. - Compare your result with the sample output when one is provided.
Frequently Asked Questions
How do I use Agent Skill to Mercadopago?
Open the skill on Promptally, review the pre-filled example, then copy the template or download SKILL.md and paste it into your model, IDE or workflow tool. Agent Skill to Mercadopago is a static blueprint with no dynamic variables. Copy it and use it as-is.
Is Agent Skill to Mercadopago free?
Yes. Agent Skill to Mercadopago is free to view, copy and download on Promptally without creating an account. It is published under the MIT license.
What variables does Agent Skill to Mercadopago need?
Agent Skill to Mercadopago is a static blueprint with no dynamic variables. Copy it and use it as-is.