Create your account and connect gateways
Sign up at the dashboard, verify your email, and connect at least two
gateway accounts (Stripe and Adyen) under Connections. Each connection
is verified with a live test call before it can be routed to.See Connecting gateways for the credential
details each gateway needs.
Set your routing rules
Under Rules, order your gateways by priority and choose which failures
trigger failover (hard declines, timeouts, gateway errors). Save to
activate. The default configuration — priority 1 with failover to
priority 2 on all retryable failures — is right for most merchants.See Routing rules.
Generate your Integration Kit keys
Under Integration Kit, generate your test keys. You receive three
credentials:
| Key | Prefix | Used for |
|---|---|---|
| Publishable key | sf_test_pk_ | Widget initialization in the browser — safe to expose |
| Secret key | sf_test_sk_ | Server-to-server API calls — keep on your backend |
| Webhook signing secret | sf_test_whsec_ | Verifying webhook signatures |
Create a payment session from your backend
This is the only server-side call you make per checkout:The response contains a
sessionId, a clientSecret, and a vault block
— pass all of them to the widget in the next step. Full contract:
Create a payment session.Embed the checkout widget
Render the widget on your checkout page with the session you just created:The widget collects the card, tokenizes it directly to the vault, submits
the payment, and holds a single loading state while routing and failover
run. See Embedding the widget.
Register your webhook endpoint
Under Integration Kit → Webhooks, register your endpoint URL and click
Verify — SwitchFlow sends a signed test event and expects a
2xx.
Then implement signature verification with your sf_test_whsec_ secret:
Verifying signatures.Run the test-card matrix
Pay with these cards on your checkout to see routing in action:
Check the Analytics page: the failover payment appears with
| Card | Behavior |
|---|---|
4242 4242 4242 4242 | Approves on your priority-1 gateway |
4000 1000 0000 0000 | Declines on priority 1 → transparent failover to priority 2 |
4000 0000 0000 9979 | Fraud-class decline — never retried, by design |
failover: true and a two-attempt trail. The full matrix is in
Test cards.