Test and live
Build against the sandbox, then switch to live with a new key and address.
Zeny runs two separate environments. They share no data: a payment, a key or a webhook endpoint made in one does not exist in the other.
| Sandbox (test) | Production (live) | |
|---|---|---|
| Key | sk_test_… | sk_live_… |
| Address | Its own address, given to you with your test keys | https://api.usezeny.com |
| Money | No real money moves; payment providers' test systems are used | Real money |
mode in every object and event | test | live |
- A
sk_test_key is refused by production and ask_live_key is refused by the sandbox, both with401 token_invalid. The same code also answers a key that is unknown or revoked, so when you see it, check first that your server uses the address and the key of the same environment, then that the key still exists in the dashboard. - Switching to live means changing three things together: the key, the address and the webhook endpoint secret. Keep them in your server's configuration, not in your code, so the switch is a deployment setting.
- Webhook endpoints are separate too. Register your endpoint in each environment and use the secret of that environment to verify signatures.
- Do not depend on test data in production: ids and references made in the sandbox are unknown to production.
If you do not have the sandbox address or test accounts for each payment method, write to support@usezeny.com. When you are ready for real money, follow the go-live checklist.