Sandbox or live
Test your payment setup in sandbox mode with no real money, then switch to live when you are ready to take real payments.
Before you start
- Your Xendit connection is saved. See Set up Xendit.
- You need the
payments.configurepermission to change the mode. - Xendit gives you a separate key and a separate webhook token for each mode. Get the live key from your Xendit account once your business is registered with Xendit.
Steps
- Open Payments, then Xendit.
- Look at the line starting Active mode. It shows Sandbox or Live, and the list under it shows what is saved for each mode: not set up, key saved with the webhook token missing, or key and webhook token saved. The badge beside the provider name and the provider card on the Payments screen show the same mode.
- Under 1. Your Xendit account, choose Sandbox / test mode or Live (real money) in Mode to set up. This only chooses which mode you are editing; it does not change the active mode.
- Paste the matching key into Secret API key. A sandbox key starts with
xnd_development_. A live key starts withxnd_production_. Click Save sandbox API key or Save live API key. - Under 2. Webhooks, paste that mode's token into Webhook verification token and click Save sandbox token or Save live token.
- When both modes are saved, click Switch to live or Switch to sandbox beside Active mode. Run Test connection and Create test payment to check the new mode.
Result
New payments use the key and webhook token of the active mode. In sandbox, no real money moves. In live, customers are charged for real.
Tips
- Sandbox and live each keep their own secret API key and their own webhook token. Saving a key or token for one mode keeps the other mode's values, so you do not enter them again when you switch.
- Switch to live or Switch to sandbox stays disabled until the other mode has a key. The note under it tells you which key to save first.
- The screen never shows a secret. It only says a key or token is saved.
- Each payment remembers the mode it was created in. A refund or a status check on that payment uses the key of that mode, and a message from Xendit about it is checked with the token of that mode. Switching mode later does not affect payments already made.
- If the key does not start with the expected prefix, the screen shows a hint and the save button stays disabled.
- Do test sales in sandbox first, for example a ₱100.00 test at the café till, before the shop opens.
- After going live, run one small real sale and check it under Payments to resolve if anything stays pending. See Payments to resolve (manager).
- Switching the provider off (the switch beside the provider name) only stops new payments. Payments already made still settle and can be refunded.
Questions
Q: Can I use my live key while Mode to set up says Sandbox?
A: No. The screen checks the prefix for the mode you picked.
Q: Does sandbox charge customers?
A: No. The test payment text on the screen says no real money moves in sandbox.
Q: Do I enter a webhook token for each mode?
A: Yes. Xendit gives test mode and live mode different tokens. Save each one under its own mode; both stay on file.
Q: I switched to live. What happens to a payment started in sandbox?
A: It is still checked, refunded and confirmed with the sandbox key and token it was created with.

