Testing
Test mode end to end — test keys, test checkout, simulating payments and webhooks, and how test and live stay separate.
Test mode lets you build and demo a complete integration with no real money, no bKash or Nagad account, no Bridge and no Service Credit.
What test mode is#
- Use a test secret key (
pt_test_sk_…). Payments it creates havelivemode: false. - The test checkout page shows TEST MODE — No real money will be moved and a clearly fake receiving number (
01XXXXXXXXX, "Test bKash"). - Every provider and payment type works: bKash and Nagad, Send Money, Payment, Cash In and Bank / Card Add Money.
allowed_methods,allowed_channelsandreturn_urlbehave exactly as in live mode. - Test payments never appear in your real payments list, revenue insights, receipts or Service Credit.
Complete a test payment#
Simulate the outcome — with the SDK, with HTTP, or with the buttons on the test checkout page:
await paytaka.testHelpers.payments.succeed(payment.id) // → PAID
await paytaka.testHelpers.payments.cancel(payment.id) // → CANCELLEDThese endpoints (POST /v1/test_helpers/payments/{id}/succeed and /cancel) accept test keys only; a live key gets a plain 404. They run through the normal payment lifecycle, so webhooks are emitted exactly as they would be for a real payment.
Test webhooks#
Register a Test endpoint (Developers → Webhooks) and it receives the events of your test payments, signed with its own secret. A Test payment is never delivered to a Live endpoint, so register a Test endpoint even if you already have a Live one. Send test event sends a harmless endpoint.test event to check your receiver. See Webhooks.
Test and live are isolated#
- A test key cannot retrieve, list or cancel a live payment (and vice versa) — the answer is
404, as if it didn't exist. - Test webhook events go only to Test endpoints, live events only to Live endpoints.
- Keys, webhook endpoints and events in the dashboard are always shown for one environment at a time.
Test payments currently do not generate downloadable receipts.
When your integration works, read Going live.