Skip to content

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.

Test mode outcomes
What you doStatusWebhookBack on your return_url
Press Pay (test mode)capturedpayment.capturedstatus=captured
Leave the checkout for more than 30 minutesfailed (session_expired)payment.failed, within about 5 minutes after the link expiresThe shopper doesn’t come back
Refund a test paymentRefund: succeededrefund.succeededNot used
The test checkout has no way to choose a decline or an error. To test your failure handling, let a test checkout expire.

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.

Test keys compared with live keys
TopicTestLive
Key starts withsk_test_sk_live_
Payments go toThe built-in test gatewayThe live gateway turned on for the currency
Money movesNeverYes
NeedsJust the keyYour account to be live
CheckoutTest page with a Pay buttonUsually 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.

  1. 01Accept the terms.
  2. 02Add billing details: email, address and a tax ID such as a GSTIN or VAT number.
  3. 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.