Testing
Test mode. The whole flow, no real money.
A test key sends every payment through ZopPay’s built-in test gateway. You don’t connect anything and nothing is charged, and test mode is free.
How it works
Real flow. Pretend money.
01
The built-in test gateway
Every payment made with a test key (sk_test_…) goes through ZopPay’s test gateway. You don’t connect it and it needs no credentials. No money moves.
02
The same API and checkout
Test payments use the same endpoints and the same checkout address as live ones. The checkout shows a test-mode notice and a Pay (test mode) button.
03
Webhooks too
Your endpoints get payment.captured, payment.failed and refund.succeeded for test payments, signed the same way as live ones.
04
Refunds
Full and partial refunds of test payments finish at once with the status succeeded.
05
Kept apart from live
A test key sees only test payments, refunds and cards. References and idempotency keys are separate per mode, and a test key can’t refund a live payment.
06
From the dashboard
You can also create a test payment in the dashboard, without code, to see the checkout and the webhooks end to end.
Outcomes
What a test payment does.
These are the results you can produce in test mode today.
| What you do | Status | Webhook | Back on your return_url |
|---|---|---|---|
| Press Pay (test mode) | captured | payment.captured | status=captured |
| Leave the checkout for more than 30 minutes | failed (session_expired) | payment.failed, within about 5 minutes after the link expires | The shopper doesn’t come back |
| Refund a test payment | Refund: succeeded | refund.succeeded | Not used |
Test and live
The key decides. Nothing else changes.
Both modes use the same address, the same requests and the same fields. Moving to live means swapping the key.
| Topic | Test | Live |
|---|---|---|
| Key starts with | sk_test_ | sk_live_ |
| Payments go to | The built-in test gateway | The live gateway turned on for the currency |
| Money moves | Never | Yes |
| Needs | Just the key | Your account to be live |
| Checkout | Test page with a Pay button | Usually your gateway’s own secure page |
Going live
Three steps. Then swap the key.
Your account goes live by itself as soon as all three are done. There is no review by ZopPay, though your gateway may have its own approval of your business.
- 01Accept the terms.
- 02Add billing details: email, address and a tax ID such as a GSTIN or VAT number.
- 03Connect a live gateway under Gateways with the keys from your gateway account.
Then create a live key under API keys, point a webhook endpoint at your production address, and use the live key in place of the test key. Until your account is live, a live payment answers 403 and the message says what is still missing.
Get a test key.
Sign up, create a test key under API keys and make a test payment. It costs nothing.