.claude/skills/abacatepay/SKILL.md
Help with AbacatePay payment integration in Next.js projects. Use when implementing PIX payments, managing subscriptions, handling webhooks, or debugging payment flows. Covers SDK usage, webhook verification, and billing management for Brazilian SaaS applications.
npx skillsauth add vitoropereira/claude-starter-kit abacatepayInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Assist with AbacatePay payment gateway integration for Brazilian SaaS applications.
bun add abacatepay-nodejs-sdk
ABACATEPAY_API_KEY="abp_live_..." # API key from dashboard
ABACATEPAY_WEBHOOK_SECRET="whsec_..." # Webhook secret
NEXT_PUBLIC_APP_URL="https://..." # For callback URLs
import AbacatePay from "abacatepay-nodejs-sdk";
const abacate = AbacatePay(process.env.ABACATEPAY_API_KEY!);
const response = await abacate.billing.create({
frequency: "ONE_TIME",
methods: ["PIX"],
products: [{
externalId: "plan-pro",
name: "Plano Pro",
quantity: 1,
price: 2990, // R$ 29,90 in centavos
}],
customer: {
email: "[email protected]",
name: "João Silva",
},
returnUrl: "https://app.com/pricing",
completionUrl: "https://app.com/billing/success",
});
// response.data: { id, url, status, amount }
const response = await abacate.pixQrCode.create({
amount: 2990, // R$ 29,90
expiresIn: 3600, // 1 hour
description: "Payment description",
});
// response.data: { id, brCode, brCodeBase64, status, expiresAt }
const response = await abacate.pixQrCode.check({ id: "pix_abc123" });
// response.data.status: "PENDING" | "PAID" | "EXPIRED" | "CANCELLED"
await abacate.pixQrCode.simulatePayment({ id: "pix_abc123" });
import crypto from "crypto";
function validateSignature(payload: string, signature: string, secret: string): boolean {
const expected = crypto
.createHmac("sha256", secret)
.update(payload)
.digest("hex");
return crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected));
}
| Event | Description |
|-------|-------------|
| billing.paid | Payment confirmed via PIX |
| withdraw.done | Withdrawal completed |
| withdraw.failed | Withdrawal failed |
interface WebhookPayload {
id: string; // Event ID (use for idempotency)
event: string; // Event type
devMode: boolean; // True if test environment
data: {
billing?: {
id: string;
amount: number;
status: string;
};
};
}
| Method | Fee | |--------|-----| | PIX | R$ 0,80 flat per transaction | | Credit Card | 3.5% + R$ 0,60 | | Withdrawal | R$ 0,80 (up to 20/month) |
id: Plan identifier (e.g., "pro-monthly")priceInCents: Price in centavos (R$ 29,90 = 2990)interval: "monthly" | "yearly" | "lifetime"limits: JSONB with feature limitsfeatures: JSONB array of display featuresuserId: One subscription per user (unique)planId: Current planstatus: "active" | "cancelled" | "expired"currentPeriodStart/End: Subscription validityabacateBillingId: AbacatePay billing IDstatus: "pending" | "paid" | "expired"paidAt: Payment confirmation timestampSee references/integration-patterns.md for:
See references/api-reference.md for complete endpoint documentation.
testing
Draft cold emails, warm intro blurbs, follow-ups, update emails, and investor communications for fundraising. Use when the user wants outreach to angels, VCs, strategic investors, or accelerators and needs concise, personalized, investor-facing messaging.
testing
Create and update pitch decks, one-pagers, investor memos, accelerator applications, financial models, and fundraising materials. Use when the user needs investor-facing documents, projections, use-of-funds tables, milestone plans, or materials that must stay internally consistent across multiple fundraising assets.
tools
iMessage/SMS CLI for listing chats, history, and sending messages via Messages.app.
development
This skill should be used when the user asks to "test for insecure direct object references," "find IDOR vulnerabilities," "exploit broken access control," "enumerate user IDs or object references," or "bypass authorization to access other users' data." Adapted for MGM-Web multi-tenant architecture.