Test and Live are separate
Switch between Test and Live in the dashboard topbar. Your team is the same in both, but everything you integrate with is kept apart.
| Item | Test | Live |
|---|---|---|
| API keys | np_test_… | np_live_… |
| Data | Test checkouts, payments, customers and invoices | Live records only |
| Payment methods | Sandbox plus provider test credentials, each switched on separately | Live provider credentials, each switched on separately |
| Webhook endpoints | Receive test events only | Receive live events only |
| Embed domains | Up to 20 for popup checkout | Up to 20 for popup checkout |
A test key asking for live data gets 403 environment_mismatch, and the other way round. Invoice numbers and reconciliation records are counted separately per environment too.
The Sandbox gateway
Sandbox is a test-only payment method you connect under Gateways. At checkout it lets you choose the outcome, so you can test both branches of your code without a provider account.
| Outcomes | Simulates a success or a failure |
|---|---|
| Money | Never moves money |
| Webhooks | Sends the same events as a real payment, with is_simulated: true |
| Availability | Test mode only. The production server refuses to start with it switched on. |
| Cost | Free |
Provider test hosts
You can also save each provider's test credentials in Test. In Test, Paymentsnp sends those payments to the provider's own test host, so the redirects, signatures and checks match what happens in Live. Credentials come from each provider, under your own merchant agreement.
| Method | Test host used in Test | How it is checked |
|---|---|---|
| eSewa | rc-epay.esewa.com.np and uat.esewa.com.np | Signed callback plus a status lookup for the exact amount |
| Khalti | dev.khalti.com and test-pay.khalti.com | Lookup for the exact amount |
| Fonepay | dev-clientapi.fonepay.com | Signed return for the exact amount |
When you save credentials, Paymentsnp checks them with the provider first and stores nothing if the provider rejects them. Saving credentials does not switch a method on; you enable it separately. Khalti is left out of checkout for amounts below NPR 10.
Switching to Live
Switching the dashboard from Test to Live asks you to confirm first, because Live means real money and real emails and SMS to your customers.
Your server picks its environment from the key it uses, not from the dashboard switch. Moving your integration to Live means swapping the np_test_ key for an np_live_ key and the test webhook secret for the live one.
Account approval
You verify your email address when you register. New accounts are then approved by the Paymentsnp team by default before you can sign in. Business details such as your registration number and PAN are optional at sign-up and are shown to the team reviewing your account.
Approval opens your workspace. Taking live payments also needs your own merchant account with each provider you want to offer.
Go-live checklist
- Approved account. Your Paymentsnp account is approved and your email verified.
- Provider testing for your credentials. Each provider you offer has accepted your merchant account, and you have run its test or UAT flow with your own credentials.
- Live credentials. In Live, save each provider's live credentials and switch the methods on.
- Live keys. Create an
np_live_key with only the scopes you need, and consider an IP allowlist and an expiry. - Webhook endpoint. Add your live HTTPS endpoint, store its
whsec_secret, and send a test event. - Allowed origins. Add your production site to allowed origins, and to embed domains if you use the popup.
- A small real payment. Pay a small amount end to end and check it under Payments and at your webhook.
After launch
- Unresolved eSewa and Khalti attempts are re-checked in the background with backoff, so a late success is still recorded.
- The Checkouts page shows payments still processing, with a button to check one now.
- Import your provider settlement files to match verified payments with what was settled. See reconciliation.
- Roll keys with a grace period when people or servers change. See key controls.