Skip to the page
Docs menu

Docs Platform

Going live

What changes from test to live mode, how to turn live mode on, live keys and webhook endpoints, key rotation, and a checklist.

Used in all three steps. Once your create, scan and sync steps work in test mode, run them against live data.

An owner turns live mode on in the console, under Billing, by accepting the Terms of Service and adding a card. Then you create live keys, a live webhook endpoint and live groups, and switch your server's environment. Your code does not change. What you pay and when is on Pricing and billing.

What changes from test to live#

In test modeIn live mode
te_test_sk_…, te_test_rk_…, te_test_ct_…te_live_sk_…, te_live_rk_…, te_live_ct_…
Test data, kept apart from liveLive data. Nothing from test carries over
Free, never billedUsage is metered and billed
The simulator (timbereye simulate scan, POST /test/scans/simulate)Refused with 403 test_mode_only. Real phones only
Objects carry livemode: falselivemode: true

The two accounts never mix: a test key cannot see live data and the reverse. Anything you set up in test mode, such as groups, webhook endpoints, places and species you added, has to be created again in live.

How to turn live mode on#

  1. In the console, open Billing (the live-mode band says Go live). Only an owner can do the next steps.
  2. Accept the Terms of Service.
  3. Add a card on Stripe's page. Nothing is charged then.

Live mode turns on as soon as both are done, and the change is in your audit log. From then on live usage is billed monthly (Pricing and billing). Above 100,000 m³ a year, or to resell, write to us for a contract instead.

Until live mode is on, test mode works as usual, live keys cannot be created, the console cannot write live data, and any request with a live key or capture token of your organisation gets 403 live_mode_not_enabled. To stop paying later, an owner chooses Stop live billing under Billing: live keys stop working at once and your data is kept.

Live keys#

Your live secret key and live publishable key are on Home in live mode as soon as live mode is on: copy the secret key into your production secret store. Only an owner can reveal, copy, create or roll a live secret key; owners and developers can manage live restricted keys. Which key to use where is on Keys.

Workers signed in to the Timbereye app before live mode was on are signed in to test: their phones upload what they hold, then ask them to sign in again, and from then on they scan live. Capture tokens are minted with the live secret key, so links made with it are live; a phone opened with a test token keeps writing to the test account until it gets a new link.

An app built with a test publishable key (te_test_pk_…) writes to the test account; ship your production build with a live publishable key (te_live_pk_…), created in the console in live mode, with the daily limits, group_access and app ids you want (Keys).

Rotating a key#

Roll a key in the console. Give the old key a grace period (expire_old_after_seconds, up to 7 days) so it keeps working while you deploy the new one; without one it stops at once. Capture tokens are not rolled; they expire within 24 hours.

A live webhook endpoint#

Webhook endpoints belong to one account, so register your production URL with the live key:

TypeScript
const timbereye = new Timbereye(process.env.TIMBEREYE_LIVE_SECRET_KEY) // the live key
const endpoint = await timbereye.webhookEndpoints.create({
    url: "https://erp.example.com/webhooks/timbereye",
    enabledEvents: ["group.created", "group.measured"],
})
curl
curl https://api.timbereye.com/v1/webhook_endpoints \
  -H "Authorization: Bearer $TIMBEREYE_LIVE_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://erp.example.com/webhooks/timbereye", "enabled_events": ["group.created", "group.measured"] }'
CLI
TIMBEREYE_SECRET_KEY=$TIMBEREYE_LIVE_SECRET_KEY timbereye webhooks endpoints create \
  --url https://erp.example.com/webhooks/timbereye --event group.created --event group.measured --json
JSON
{
    "id": "whk_6Yc1Ds",
    "object": "webhook_endpoint",
    "livemode": true,
    "url": "https://erp.example.com/webhooks/timbereye",
    "status": "enabled",
    "secret": "whsec_…"
}

Abbreviated. The live endpoint has its own signing secret, shown once: set it as your production webhook secret. To rotate it, POST /webhook_endpoints/{id}/roll_secret; the old secret keeps signing for 24 hours and deliveries carry both signatures meanwhile. See Stay in sync.

Checklist#

  • [ ] The whole flow works in test mode: create a group, scan into it, your handler updates your record.
  • [ ] Live mode is on for your organisation (Billing shows Live mode is on), and an owner has set a spend cap if you want one.
  • [ ] A live secret key is in your production secret store; no secret key is in any app.
  • [ ] Your server mints live capture tokens limited to each worker's groups, with the shortest lifetime that covers an upload.
  • [ ] A live webhook endpoint is registered and its secret is in production; your handler verifies signatures and ignores repeated webhook-ids.
  • [ ] You watch the endpoint's status: an endpoint whose deliveries have all failed for three days is disabled with no email (GET /webhook_endpoints).
  • [ ] Workers in the Timbereye app have signed in again since live mode was turned on (the Team page shows each phone's mode), or your app ships a live publishable key with limits set for your volume.
  • [ ] Nothing in production calls the simulator.