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...
Scanned 5/28/2026
Install via CLI
openskills install Hainrixz/agente-pagokit---
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_digital_goods`
- User asked about taxes / "no quiero manejar IVA" → `wants_no_fiscal_overhead`
Rank by score desc. Pick top 1 as the **primary recommendation**.
### Step 5 — Output (top 1, alternatives on demand)
Format (in user's language):
```
**Te recomiendo: <Provider Name>.**
Por qué:
• <Concrete reason 1: regional fit>
• <Concrete reason 2: currency/methods>
• <Concrete reason 3: product type fit>
Costo real para un cobro típico:
Un cobro de <example_amount> <currency> → comisión ~<calculated_fee> → recibes ~<net> netos.
Cálculo: <fee_pct>% + <fee_fixed>. <Optional: VAT/IVA note>.
KYC / activación: <kyc.time_to_activate_days> días. <individual_allowed note>.
⚠️ Cosas que debes saber:
<one or two anti-patterns from provider.anti_patterns most relevant to user's stack>
<Wompi-specific: requires Bancolombia 30d for individuals>
<Lemon Squeezy-specific: acts as MoR, you can't customize the checkout brand heavily>
¿Listo para que implemente la integración? (sí / muéstrame alternativas / pregunta)
Información verificada al <last_verified_at>.
```
**Choose `example_amount` honestly:**
- Ebook / digital good → 20 in the local currency unit (USD, EUR, MXN), or 80,000 COP.
- SaaS subscription → 19 / month in detected currency.
- E-commerce physical → 50 in detected currency.
- If unclear, ask "¿Cuánto cuesta más o menos lo que vas a vender?" once.
**Never show numeric scores.** "Te recomiendo X" is enough; the score is internal.
**Alternatives on demand.** If the user says "muéstrame alternativas" / "show alternatives", show the next 1–2 providers in the ranking with a one-line differentiator each. Don't dump the full ranking unless explicitly asked.
### Step 6 — Hand off to integration-specialist
Once the user confirms with "sí" / "yes" / "listo", invoke the `integration-specialist` subagent with the following structured params (pass them in the agent prompt as a fenced JSON block):
```json
{
"provider": "stripe|mercadopago|wompi|lemonsqueezy",
"stack": "<from project-analyzer>",
"deploy_target": "<from project-analyzer>",
"orm": "<from project-analyzer>",
"billing_mode": "one_time|subscription",
"frontend_style": "hosted|embedded|widget — ask user if provider supports >1",
"required_methods": ["card", "oxxo", "..."],
"language": "es|en|pt|...",
"use_cases_detected": ["save_card_subscription", "..."],
"example_transaction_amount": <number>,
"example_currency": "<3-letter>"
}
```
When you invoke integration-specialist, also tell it: "After the integration is generated, run `/pagokit:test` to verify the webhook handler. Then check `PAGOKIT_PRODUCTION_CHECKLIST.md` before going live."
### Step 7 — Legal obligations footer
After the subagent reports back successfully, append to your final message a legal-obligations footer based on `seller_country` and `buyer_regions`:
- EU buyers → "Bajo GDPR debes publicar política de privacidad y obtener consentimiento explícito para cookies."
- Brasil → "LGPD aplica; emisión de NF-e es responsabilidad tuya (a menos que uses Lemon Squeezy como MoR)."
- México → "LFPDPPP aplica; emisión de CFDI 4.0 es responsabilidad tuya."
- California (US) → "CCPA aplica."
Cite **SECURITY_RULES Rule 11** ("PII colección mínima + aviso regional").
## Anti-patterns
- Do NOT show users a numeric score, a ranking table, or "Stripe 8.5 / MP 7.2".
- Do NOT recommend a provider that fails a hard filter. Use the fallback instead.
- Do NOT skip the confirmation step in Step 2 — users distrust silent analysis.
- Do NOT ask more than 5 questions total.
- Do NOT write code from this skill. Always delegate to integration-specialist.
- Do NOT promise compliance ("PCI ready", "PSD2 compliant") — defer to the user's legal team.
- Do NOT recommend Authorize.net / legacy providers in Phase 1 (not in catalog).
- Do NOT use Stripe Charges API in any explanation — Stripe defaults to Payment Intents.
No comments yet. Be the first to comment!