What it is
The sandbox is a company of its own, linked to yours: its own database, ticket engine account, shop and keys. Orders, payments, door scans and webhooks in it are real in every way except one: nothing reaches your live company, and payments go through Stripe’s test mode.
An admin opens it from the live console with Settings, Sandbox, Open the sandbox. Every page in it says it is the sandbox, and Back to live returns to the live console without signing in again.
Test keys
Make keys on the sandbox’s own API keys page. They start eos_sk_test_ or eos_pk_test_, so they are plain to see in your settings and logs, and they only work in the sandbox: a test key sent for your live company, or a live key for the sandbox, is refused. The base address is the same for both.
curl https://eos.aveoevents.com/api/v1 \
-H "Authorization: Bearer $EOS_TEST_KEY"
# {"object": "api_key", "livemode": false, "company": {"slug": "acme-events-sandbox", ...}}livemode
Answers from the sandbox say so: the key check (GET /api/v1) and the company object carry "livemode": false, and so does every webhook the sandbox sends. Check it on your server so test events can never be mistaken for real ones.
const event = wh.verify(req.body, req.headers);
if (event.livemode !== (process.env.NODE_ENV === "production")) {
return res.sendStatus(200); // a test event on the live server, or the other way round: ignore it
}Test cards
Card payments in the sandbox go through Stripe in test mode. Use Stripe’s test cards with any future expiry date, any three-digit CVC and any postcode.
| Card number | What happens |
|---|---|
4242 4242 4242 4242 | Paid straight away |
4000 0025 0000 3155 | Asks for 3-D Secure, then paid |
4000 0000 0000 9995 | Declined: insufficient funds (order.payment_failed) |
4000 0000 0000 0002 | Declined by the bank (order.payment_failed) |
Connect a test Stripe account on the sandbox’s Payments page first: Stripe’s test onboarding asks for test details only. Until then the sandbox can sell free tickets and tickets paid at the door.
What to try
- Make an event with two ticket types, an add-on and a discount code, and publish it.
- Sell through hosted checkout and your own: a paid card with its booking fee, a declined card, a free order and a ticket paid at the door.
- Refund one order in part and one in full, and cancel one.
- Scan tickets in and out with the EOS scanner or your own app, including a ticket scanned twice.
- Add a webhook endpoint and watch every event arrive, signed, with
"livemode": false. - Emails arrive at the addresses you enter, with [Test] in the subject.
Going live
- Make keys in the live company with the same permissions, and put them in your production settings.
- Add your webhook endpoints in the live company (each has its own signing secret).
- Make sure your server accepts only
"livemode": truein production. - Make one small real purchase and refund it, to see the whole path end to end.