Sandbox

Every company on EOS has a sandbox: build and test your website or app against it, with no real money and no live data.

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
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.

Node.js
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 numberWhat happens
4242 4242 4242 4242Paid straight away
4000 0025 0000 3155Asks for 3-D Secure, then paid
4000 0000 0000 9995Declined: insufficient funds (order.payment_failed)
4000 0000 0000 0002Declined 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

  1. Make keys in the live company with the same permissions, and put them in your production settings.
  2. Add your webhook endpoints in the live company (each has its own signing secret).
  3. Make sure your server accepts only "livemode": true in production.
  4. Make one small real purchase and refund it, to see the whole path end to end.