# Going live

What to check before your first client sends real messages.

## Your integration

- Sends with a live key, read from an environment variable or a secrets store.
- Sets an `Idempotency-Key` on every send, and retries only after a network error, 429 or 5xx.
- Sends a corrected message with a new key, as a refused send keeps its own.
- Handles errors by `error.code`, never by the message text.
- Sends a template once the 24-hour window is closed, and records consent before the first template to a new number.
- Logs `request_id` from every failed response.

## Your webhook

- Answers 2xx at once and does the work in the background.
- Hears the events it needs: only those ticked on the account's **Webhook** page are sent.
- Checks the signature and rejects an event whose `webhook-timestamp` is more than 5 minutes off.
- Goes by the times in `data`, as events can come out of order.
- Drops repeats by the `webhook-id` header.
- Finds the client by `workspace.id`.
- Passes the test event from the workspace's **Webhook deliveries** page.

## Your client's channel

- Is `connected` in `GET /v1/channels`, with no `alerts`.
- Has a working card at Meta for WhatsApp, and the templates you need approved.
- Has `limits.new_customers_per_day` in `GET /v1/channels` high enough for the customers you plan to write to first.

## After launch

- Watch `channel.updated` events: a channel cut off, or an alert such as `payment`.
- Watch `quality` in `GET /v1/channels`, or on the workspace's **Channels** page: a `low` rating means customers block or report the number.
- Keep each connection paid: an unpaid one stops sending with `payment_required`.