Guides
Testing
A complete sandbox: test keys, one-click payments, real webhooks β no phone, no money.
Test mode is a full copy of TakaElo with its own payments, keys and webhook deliveries. Switch the dashboard between Live and Test at the top; everything you see follows the switch.
What's different in test mode
| Test | Live | |
|---|---|---|
| Keys | sk_test_β¦ | sk_live_β¦ |
| Paying a checkout | Simulate payment button on the checkout page | Real money into your wallet number |
| Your phone | Not needed | Connected, with the TakaElo app |
| Return URLs | Your websites, or http://localhost (any port) | https on your websites only |
| Plan limits | None, ever | Your plan's |
| Webhooks | Sent to your Test endpoint, with livemode: false | Sent to your Live endpoint, with livemode: true |
| Webhook secret | The Test endpoint's own whsec_β¦ | The Live endpoint's own whsec_β¦ |
Pay a test checkout
- Create a checkout with your
sk_test_key and open itsurl. - Pick any wallet and type any number (e.g.
01711223344). - Press Simulate payment. The payment completes with a
TESTβ¦TrxID, the webhook fires, and the page returns to yoursuccess_url.
Developers βΊ Sandbox in the dashboard can also make and pay a test payment in one step, and choose the wallet, amount and sender β handy for trying your webhook handler with different values. Paying part of an open test checkout (an amount below what's due) gives you a short payment and payment.partially_paid; paying again with no amount sends the rest.
Pay from your code
Your tests, or your AI coding assistant, can do the whole thing without a person: create a checkout with your sk_test_ key, pay it with POST /v1/test_helpers/payments/{id}/pay, then read the payment's webhook log to see what TakaElo sent to your server and what it answered. Above ΰ§³20,000 a test payment waits for review, as real money would.
Things worth testing
| Case | How | Expect |
|---|---|---|
| Happy path | Simulate payment | payment.completed; order fulfilled once. |
| Duplicate delivery | Re-send the same delivery from Developers βΊ Webhooks | Your handler replies 200 and does nothing new. |
| Customer gives up | Press "Cancel and go back to the shop" | payment.failed with cancelled; you land on cancel_url. |
| Time runs out | Leave a checkout open past its time | payment.failed with expired. |
| Bad signature | Change one byte of a signed request (cURL tab on Webhooks) | Your endpoint answers 400. |
| Timeout and retry | Retry a POST with the same Idempotency-Key | The same payment comes back, Idempotent-Replayed: true. |
| Refund | Record a refund on a completed test payment | payment.refunded. |
| Short payment | Sandbox: pay ΰ§³500 of a ΰ§³1,250 checkout, then the rest | payment.partially_paid, then payment.completed (if you ticked them). |
| Customer report | Report a problem from a test checkout's help link, answer it, settle it | dispute.opened β dispute.updated β dispute.closed. |
Webhooks to your laptop
TakaElo can't reach localhost. Start a tunnel (ngrok http 3000), switch the dashboard to Test, set the https address it prints as your Test endpoint, and use Send test event or Simulate payment. Your Live endpoint stays as it is. Or skip TakaElo entirely: the cURL tab on Webhooks signs a request to your local server with your secret.