Payment flows for your merchants
A payment flow is the routing rule a charge runs through: which processors to try, in what proportion, in what fallback order, and whether 3DS is enforced. Server-to-server payments explains how a flow is executed at charge time. This page is about the other half — creating and managing flows on behalf of one of your merchants, entirely over the API.Yes — a partner can create payment flows for a merchant. Verified end-to-end
against production: a merchant-scoped key can
list, create, update and
delete flows for that merchant’s account. The flow you create is owned by the
merchant and routes across that merchant’s TPAs.Which key can manage flows
The payment-flow endpoints are account-scoped and requireorg:admin. Use a
merchant-scoped key, not your raw partner key:
One merchant-scoped key is enough for all of that merchant’s TPAs. A
processing key restricted to one TPA still resolves to the merchant account, so a
flow it creates can reference every TPA the merchant owns. You don’t need a key
per processor.
What’s auto-created with a TPA
Provisioning a TPA doesn’t leave you with nothing — but it doesn’t fully wire a chargeable store either. Here’s exactly what exists, and when:
So the minimum to charge a freshly provisioned TPA is: one
storeId + one
paymentFlowId (the auto-created Default flow is enough for a single TPA).
Create your own cascade/weighted flow only when you want routing across several
TPAs.
Step 1 — Find the merchant’s processors
Each TPA shows up as a processor of typetagadapay-router, and the TPA id lives
in options.tagadapayAccountId. That’s how you map a TPA to its processor:
listWithProcessors is the convenience variant — it returns every processor on
the account plus the existing flows in one call:
For partner-provisioned merchants the processor
type is tagadapay-router —
that’s the TPA being routed to. (A merchant who connects their own Stripe/NMI
would instead see type: 'stripe', 'nmi', etc.)Step 2 — Create a flow
Cascade (failover)
Primary TPA first; if it declines (non-terminal), Tagada automatically retries the same charge on the next TPA — no retry code on your side.Weighted (traffic split)
Send a share of traffic to each TPA. Great for load-balancing or gradually migrating a merchant onto a new acquirer.Field reference
Step 3 — Use the flow when charging
PasspaymentFlowId to payments.process to route a charge through a specific
flow. It overrides the store’s default for that call:
Manage existing flows
See it running
The cascade + weighted flows above are wired in the runnable demo — a picker for single / cascade / weighted, plus a “force the primary to decline” toggle so you can watch the failover happen:partners-examples/02-merchant-checkout
One merchant, several TPAs, cascade and weighted routing — end to end.
