Multi-PSP Routing & Vault
Time: ~10 minutes | Difficulty: IntermediateThe Problem
You’re locked into one payment processor. If it declines, you lose the sale:TagadaPay sits above every PSP. It’s not a Stripe plugin or a Checkout.com add-on. You connect any combination of Stripe, NMI, Checkout.com, Airwallex, and more — then define routing rules. Each processor is just a connection with API keys.
How It Works
Step 1: Connect Your Processors
Add each processor in the TagadaPay dashboard → Settings → Processors, or connect them via the SDK:
After connecting, list them via the SDK to get their IDs:
Step 2: Create a Payment Flow
A payment flow defines how transactions are routed across your 4 processors:Yes, a processor can appear in both lists. Stripe is the primary at 40% and the 2nd fallback. If Checkout.com or Airwallex declines, NMI tries first, then Stripe retries — sometimes a retry on the same PSP with a fresh attempt succeeds.
Step 3: Vault a Card (Tokenize Once)
Card data is tokenized client-side via@tagadapay/core-js. The raw card number never reaches your server.
One vault, all processors. The payment instrument is PSP-agnostic. TagadaPay translates it to the right format for whichever processor the flow selects — Stripe, NMI, Checkout.com, Airwallex, or any other. You tokenize once, charge anywhere.
Step 4: Charge — TagadaPay Routes Automatically
- TagadaPay’s weighted algorithm picked Checkout.com (30% weight, this time)
- If Checkout.com declined → automatically retried on NMI (fallback #1)
- If NMI also declined → retried on Stripe (fallback #2)
- The winning processor is recorded in
payment.processorId
Routing Strategies Explained
Weighted Distribution
Split traffic by percentage. Great for load balancing or gradually migrating to a new processor.Lowest Capacity
Sends traffic to whichever processor has processed the fewest transactions today. Auto-balances across all 4 PSPs.Automatic (Round Robin)
Equal distribution — each processor gets roughly the same number of transactions.Sticky Processor
When enabled, a returning customer is always routed to the processor that last succeeded for them. Reduces declines on stored-credential transactions.Multiple Flows for Different Scenarios
You can create different flows for different situations. Example: a standard flow and a high-value flow using different processor mixes:Recurring Charges (MIT)
For subscriptions and server-initiated charges, useinitiatedBy: 'merchant'. The vaulted instrument works the same way — TagadaPay handles the stored-credential handshake with each PSP.
Cards first charged on another processor
TagadaPay sends the card’s network transaction id on every merchant-initiated charge. It takes it from the first customer payment made through TagadaPay. If that first payment was made on another processor (you are moving existing subscribers), pass its network transaction id once:Comparison: Single PSP vs TagadaPay
Full Example: 4 PSPs, End to End
Stripe Connect via API
If your merchants use Stripe, you can programmatically connect their Stripe accounts via OAuth instead of manually entering API keys.How It Works
Step-by-Step
1. Create a Stripe processor (placeholder)redirectUrl to control where the merchant lands after authorizing:
- Exchanges the authorization code for access tokens
- Saves the connected Stripe account ID and credentials on the processor
- Enables the processor
- Redirects the merchant to your
redirectUrl(or the default processors page)
Disconnect a Stripe Account
Next Steps
Subscriptions & Rebilling
Trials, auto-retry, manual rebill, processor migration for recurring billing
Node SDK Quick Start
Full SDK setup with stores, products, and funnels
core-js + REST
Build your own checkout UI with client-side card tokenization and 3DS
Scripts & Pixels per Step
Add tracking pixels and custom scripts to funnel steps
