Skip to main content

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.
The direct-merchant guide Multi-PSP Routing & Vault shows a merchant wiring flows across PSPs they connected. As a partner you do the exact same thing, with one difference: each processor in a partner flow is one of the merchant’s TPAs (the Adyen sub-merchant, the Stripe MoR account, etc.) that you provisioned for them.

Which key can manage flows

The payment-flow endpoints are account-scoped and require org: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.
Mint a merchant-scoped key with your partner key, then build a fresh client with it:
See API keys for the full minting flow.

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:
The store and the Default flow are not linked out of the box. A charge by storeId alone will fail with Payment flow ID not found until you either:
  • pass paymentFlowId explicitly on payments.process (recommended — see Step 3), or
  • set the store’s default flow in the dashboard → Store → Payments.
This is intentional: one merchant can own several TPAs, so Tagada doesn’t guess which one a store should default to — you decide, per charge or per store.
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 type tagadapay-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

Pass paymentFlowId to payments.process to route a charge through a specific flow. It overrides the store’s default for that call:
You can omit paymentFlowId only if the store has a default flow set (see the warning above — it isn’t set automatically). Passing it explicitly is the reliable path and lets you keep several flows on one merchant (e.g. a standard cascade and a high-value flow) and pick per charge — exactly like the direct-merchant guide.

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.