Skip to content
Development
Command

/add

Add a second payment provider alongside an existing integration, without touching the one already running.

From plugin
pagokit
708 skills1 agent8 commands5 hooks
> /plugin marketplace add Hainrixz/agente-pagokit
> /plugin install pagokit@tododeia

Command definition

add.md
description: Add a second payment provider alongside an existing integration, without touching the one already running.
argument-hint: "[<provider-id>]"

/pagokit:add

Real projects end up with more than one provider: a local one for domestic buyers and a cross-border one for everyone else, or a card processor plus a wallet. PagoKit has assumed this since v0.1 — every webhook route is namespaced `/api/webhook/<provider>` precisely so a second one can land without a collision.

1. Read `PAGOKIT_INTEGRATION.md` to learn what already exists: provider, routes, tables, env vars. If it is missing, detect the existing integration by globbing for webhook routes and payment SDK imports, and say you are working from inference. 2. If no provider was named, run `payment-advisor` for the **new** requirement — not the one already solved. Ask what the existing provider does not cover: a country, a rail, a billing mode. 3. Plan the addition, and be explicit about what is shared and what is not:

| Shared | Duplicated per provider | |---|---| | `payments`, `customers`, `webhook_events_processed` tables (add a `provider` column if absent) | The webhook route, namespaced | | `lib/payments/errors.ts` — extend the taxonomy | The SDK client and its env vars | | The checkout entry point, which now routes by provider | The provider-specific checkout call |

4. Delegate to `integration-specialist` with an explicit instruction: **do not modify the existing provider's files.** Additive changes only.

Before you write anything

  • Confirm the `provider` column exists on the shared tables. Without it, a webhook from the

new provider can update a payment created by the old one.

  • Confirm the new webhook route does not collide. The `existing-webhook-check` validator will

block it if it does, but catching it here is cheaper than a blocked write.

  • Decide how the checkout picks a provider — buyer country, currency, or an explicit choice —

and write it down in `PAGOKIT_INTEGRATION.md`. This is the part that gets forgotten and becomes unexplainable six months later.

Anti-patterns

  • Do not refactor the existing integration "while you are in there". Adding a provider must

not risk the one currently taking money.

  • Do not share an idempotency key namespace across providers.
  • Do not merge the two webhook handlers into one route with a switch. Separate routes are

what let you disable one provider without touching the other.

Read more
@hainrixz
Ships withpagokit

Claude Code plugin that picks and implements the right payment method for your app — from your terminal. 42 providers, 136 payment rails, and deterministic validators that block insecure payment code as it is written.

708 skills1 agent
Get the whole plugin

Stars on GitHub

Momentum

stars in total
70
Star history of Hainrixz/agente-pagokit on GitHub, a chart by star-history.com

Other commands on pagokit.

compare

compare

Command

Compare two or more payment providers head to head for a concrete situation — real fees on a real amount, coverage, onboarding…

@hainrixz@hainrixzInstall Command
coverage

coverage

Command

Show what you can actually use in a given country — providers, local rails, currency exponent, e-invoicing obligation, and…

@hainrixz@hainrixzInstall Command
doctor

doctor

Command

Audit an existing PagoKit integration — gitignore, env vars, key prefixes, webhook secret, raw body, replay protection,…

@hainrixz@hainrixzInstall Command
harden

harden

Command

Audit a hand-written payment integration and FIX what it finds. Unlike /pagokit:doctor, which is read-only, this one writes.

@hainrixz@hainrixzInstall Command
migrate

migrate

Command

Migrate from one payment provider to another, keeping the old one running until the new one is proven.

@hainrixz@hainrixzInstall Command
start

start

Command

Analyze the current project and generate a production-ready payment integration (frontend + backend + webhook + DB + portal +…

@hainrixz@hainrixzInstall Command

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command