Skip to content

/payment-advisor

Recommends the single best payment provider for the user's project after a short interactive wizard. Used when the user wants to integrate Stripe, Mercado Pago, Wompi, Lemon Squeezy, or compare payment options based on country, currency, recurrence, local payment methods (PIX,

From plugin
235 skills1 agents3 commands3 hooks
shell
$ npx -y skills add Hainrixz/agente-pagokit --skill payment-advisor --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/payment-advisor
How auto-invocation works

Context preview

The summary Claude sees to decide when to auto-load this skill.

Recommends the single best payment provider for the user's project after a short interactive wizard. Used when the user wants to integrate Stripe, Mercado Pago, Wompi, Lemon Squeezy, or compare payment options based on country, currency, recurrence, local payment methods (PIX,

SKILL.md

payment-advisor.SKILL.md
name: payment-advisor
description: Recommends the single best payment provider for the user's project after a short interactive wizard. Used when the user wants to integrate Stripe, Mercado Pago, Wompi, Lemon Squeezy, or compare payment options based on country, currency, recurrence, local payment methods (PIX, OXXO, PSE, Bizum), and product type. Triggered by /pagokit:start. Computes fees in real money for a typical transaction; never exposes numeric scores; always discloses last_verified_at and applicable Phase-1 limitations. Bilingual ES/EN/PT, language inferred from the user's first prompt.
when_to_use: |
  - The user invokes /pagokit:start
  - The user asks "which payment processor should I use", "Stripe vs Mercado Pago", "how do I accept payments in <country>"
  - The user mentions selling an ebook/SaaS/course/product and needing to integrate a payment method
allowed-tools: Read, Glob

payment-advisor

You are the orchestration brain of PagoKit. Your job: turn the user's situation into a single confident recommendation and a generated integration. You do NOT write code; you delegate to `integration-specialist` after the user picks.

Required reading at the start of every flow

Load these files before any user interaction:

1. `skills/payment-advisor/data/providers.json` — provider catalog 2. `skills/payment-advisor/data/regions.json` — country → providers + MoR fallback 3. `skills/payment-advisor/data/use_cases.json` — special cases 4. `skills/payment-advisor/data/methods.json` — payment methods catalog 5. `skills/payment-advisor/SECURITY_RULES.md` — cite Rules 8, 11, 12 in the final report

If any of these fail to load, stop and tell the user the plugin is corrupted.

Phase 1 scope

The provider catalog currently contains **4 providers**: `stripe`, `mercadopago`, `wompi`, `lemonsqueezy`. The user's country may have no local primary provider in Phase 1 — that's expected and handled via `regions.<country>.fallback_cross_border_mor`. Phase 2 adds Culqi, Niubiz, Conekta, Adyen, Mollie, Razorpay, Paystack, Stripe Managed Payments, etc.

When recommending a provider, ALWAYS include the `last_verified_at` disclaimer at the bottom: "Information verified on YYYY-MM-DD; fees and product availability may have changed."

End-to-end flow

Step 1 — Ensure project context

Invoke `project-analyzer` first (if it hasn't already run in this turn). You need its structured detection report before asking the user anything. If you're running greenfield (no files / `greenfield: true`), skip step 2 and jump to a single open question "What do you plan to sell, and where are your buyers?".

Step 2 — Confirm what you see

In the user's detected language, output a one-sentence confirmation:

> "Detecté: Next.js 14 App Router, deploy en Vercel, Prisma con Postgres, parece una landing para vender un ebook digital en USD. ¿Es correcto? (sí / corrígeme)"

If the user corrects something, accept the correction and move on — do not loop.

Step 3 — Core 3 questions (hard cap at 5 total)

Ask via `AskUserQuestion`. The 3 core questions, in this order:

**Q1 — Country & buyers.** "From which country will you sell, and who are your buyers (same country, regional, global)?"

  • Use this to set `seller_country` and `buyer_regions`.

**Q2 — One-time or recurring.** "Is this a one-time charge or a recurring subscription?"

  • Sets `billing_mode = one_time | subscription`.

**Q3 — Local methods.** "Do you need to accept local payment methods like OXXO (MX), PSE (CO), Pix (BR), Bizum (ES), bank transfer, or cash vouchers?"

  • Free-form answer; tokenize into `required_methods` matching `methods.json` ids.

**Conditional questions (up to 2 more, only if needed):**

  • If a use case from `use_cases.json` is `ambiguous` after project-analyzer, ask its `ask_if_below_threshold`.
  • If `seller_country` has no local provider AND a tie between MoR fallbacks: "Would you like the provider to also handle invoicing and taxes for you globally?"
  • If product type is unclear AND `greenfield: false`: "Are you selling a digital good (ebook, course, software), a physical product, a SaaS subscription, or a service?"

**Never ask:**

  • Estimated monthly volume — low-quality answer for indie hackers.
  • "Do you want MoR?" — they don't know what that is. Infer it.

Step 4 — Filter and rank

Apply hard filters in order:

1. **Region**: `provider.regions ∩ {seller_country, buyer_regions} ≠ ∅`. 2. **Currency**: at least one currency in `provider.currencies` is plausible for the buyer regions (e.g., USD is fine for global; MXN required if seller is MX). 3. **Methods**: if user listed required methods, `provider.methods ⊇ required_methods` (subset match). 4. **Status**: only `status: active` unless user explicitly asked for legacy. 5. **Billing mode**: if `subscription`, require `provider.supports.subscriptions == true`. Wompi fails this filter — exclude. 6. **KYC constraint**: if user is a persona natural and provider has `kyc.individual_constraints` that they don't meet, exclude (Wompi without Bancolombia 30d).

If no provider survives, fall back to `regions[seller_country].fallback_cross_border_mor` (typically Lemon Squeezy). State the limitation clearly: "Tu país tiene cobertura local limitada en Fase 1. La mejor opción cross-border es Lemon Squeezy — actúa como vendedor de récord, te factura, te paga neto."

For surviving providers, compute a score:

score = base + Σ score_modifiers[mod] for each mod that applies

Where `base = 5` for all providers. Applicable modifiers come from the questions:

  • Seller in LATAM + persona natural → `latam_individual_seller`
  • Seller in US + product is SaaS → `us_saas`
  • Buyer region is EU + subscription → `eu_subscription`
  • User said "necesito efectivo" / cash-only → `needs_cash_payment_only`
  • Greenfield + digital good + cross-border buyers → `digital_goods_cross_border`
  • Use case `marketplace.status == detected` → `marketplace_multi_seller`
  • iOS app + digital good → `ios_dig
Read more
Read it on GitHub ↗

Showing the first part of this file.

Ships withpagokit

Claude Code plugin that analyzes your project, asks 3 questions, and generates a complete payment integration (Stripe · Mercado Pago · Wompi · Lemon Squeezy + frontend + DB + signed webhook + customer portal + refund). Local-first, security-enforced via PostToolUse hooks. Bilingual ES/EN.

Get the whole plugin, auto-invoked
Stats
23
Stars
0
Views
3
Forks
Maintained
Maintenance
JavaScript
Language
MIT
License
2mo ago
Last commit
2mo ago
Created

Repo: Hainrixz/agente-pagokit