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

Steps

  1. Open Payments, then Xendit.
  2. 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.
  3. 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.
  4. Paste the matching key into Secret API key. A sandbox key starts with xnd_development_. A live key starts with xnd_production_. Click Save sandbox API key or Save live API key.
  5. Under 2. Webhooks, paste that mode's token into Webhook verification token and click Save sandbox token or Save live token.
  6. 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

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.