Skip to content

Test and live modes

Each client has two modes: test for development and checks, and live for real users. The API key sets the mode: aapp_test_… or aapp_live_…. Both use the same API URL.

What test live
API key aapp_test_… aapp_live_…
Event signing secret its own its own
Webhook secret and URL their own their own
Event dictionary, scenarios, badges their own their own
Users, events, rewards their own their own
Discount delay and term to the minute: handy for quick checks in whole days

The modes’ data never mix. An object of the other mode doesn’t exist for you: requests for it get 404.

  • In test we can set scenarios up with a short delay and term, for example 5 minutes instead of 14 days, so the whole path from event to redemption fits into one evening.
  • Use separate user_refs for tests, for example with a test_ prefix.
  • Go through the end-to-end example in test: creating a user, events, webhook, coupon, reserve, redeem, refund.
  • Check the unhappy paths: a repeated event, a wrong signature, 409 on reserve, a timeout on reserve.
  1. We set up the live dictionary and scenarios according to the plan agreed with you.
  2. You get an aapp_live_… key, the live event signing secret and, when we are ready, the live webhook secret and URL.
  3. You switch your server’s configuration. The code doesn’t change: same requests, different keys.
  4. For the first days we reconcile together: events arrive, progress is counted, webhooks are received.

Keep the keys of different modes in different environment variables, so a test server never writes to live by accident.