Testing Gateway Onboarding on Juspay
This document explains the different ways to test a newly onboarded Payment Gateway (PG) on Juspay.
The exact testing approach depends on:
The setup available at your end
What the Payment Gateway supports
Your intended use case (UAT vs Production)
Based on these factors, multiple testing combinations are possible. Each combination and its recommended options are described below -
Gateway UAT Testing on Juspay Sandbox
Gateway Production testing on Juspay Sandbox
Gateway Production testing on Juspay Production
1. Gateway UAT Testing on Juspay Sandbox
This method is used when Payment Gateway sandbox credentials are available.
Important Notes
Only limited payment methods may be available.
Transactions work only with specific test cards, psp app provided by the PG.
Ideal for early-stage validation of the gateway integration.
Testing Options
Option 1: Disable All Other Gateways on Juspay Sandbox Dashboard
Recommended when:
You have very few active gateways on Juspay Sandbox, or
You do not have the Juspay Sandbox APIs Postman collection set up.
How it works:
Deactivate all existing gateways on the Juspay Sandbox Dashboard.
Keep only the newly configured gateway active.
Since only one gateway is active, all sandbox transactions will automatically route to it.
Option 2: Use Gateway Reference ID
Recommended when:
You have the Juspay Sandbox APIs Postman collection ready.
How it works:
While configuring the gateway on the Juspay Dashboard, assign a unique Gateway Reference ID.
In your Postman setup, pass this Gateway Reference ID in:
Create Order API, orSession API
Juspay will route the transaction only to the gateway matching that reference ID.
2. Gateway Production Credentials Testing on Juspay Sandbox
Some Payment Gateways allow Juspay’s Sandbox environment to hit their Production systems.
When to use this
The PG supports Juspay sandbox → PG production traffic.
You want to fully test real payment flows before going live.
How it works
Configure Production credentials of the gateway on the Juspay Sandbox Dashboard.
Set the gateway mode to Production while configuration.
You can now test all payment methods using real money, without impacting actual live traffic.
Testing Method
Follow any of the testing options listed in Section 1 (Disable other gateways or use Gateway Reference ID).
Before going live: Ensure the Webhook URL is updated to the Production webhook endpoint.
3. Gateway Production Testing on Juspay Production
This is used for final validation after sandbox testing. Production testing can be done in two controlled ways, depending on your setup.
Option 1: Use Gateway Reference ID
Recommended when:
You have the Juspay Production APIs Postman collection set up.
How it works:
Assign a unique Gateway Reference ID while configuring the gateway on the Juspay Production Dashboard.
Pass this reference ID in:
Create Order API, orSession API
Only orders containing this reference ID will be routed to the gateway under test.
Option 2: Use a Dedicated Priority Logic (PL)
Recommended when:
You have access to internal test customer IDs that are sent to Juspay.
How it works:
Create an enforced Priority Logic on the Juspay Production Dashboard.
Add only your internal test customer IDs to this logic.
Transactions from these customers will be routed exclusively to the gateway being tested while none of your live traffic gets affected.
If an existing Payment Gateway faces downtime, Juspay may reroute traffic to other active gateways—including the one under test.
To avoid unintended routing: Disable or deactivate the gateway on the Juspay Dashboard when it is not actively being tested.
FAQs & Troubleshooting
Error: "Payment Mode not active"
Error: "Can't find suitable gateway"
Error: "Unauthorized" or "Invalid API Key"
- Have questions?
- Need help? Contact support
- LLM? Read llms.txt

