Go Live
Complete this checklist before switching from sandbox to live traffic.
Work through every section below. Each item includes a brief explanation of why it matters. Skipping items is the most common cause of production incidents on launch day.
Authentication and credentials
-
Created a live API key (
environment: live) — separate from your sandbox key. Live keys carry real charges and query real providers; they must be managed separately. -
Live API key stored in environment variables, not hardcoded — the key must never appear in source code, config files checked into version control, or application logs. Use a secrets manager (AWS Secrets Manager, GCP Secret Manager, HashiCorp Vault) or at minimum an
.envfile excluded from git. -
Sandbox keys removed from production config — confirm no
lira_sandbox_...key appears in your production environment variables, deployment configs, or CI/CD pipelines. -
Bearer token refresh logic implemented — access tokens expire (check
expiresIn). When a management request returns401with "token expired", your code must callPOST /auth/refreshand retry automatically rather than failing or prompting the user. See Authentication for the refresh flow.
Verification integration
-
Both
successandfailedresponses handled —failedis a normal, expected outcome. Your code must handle it gracefully: surface a useful message to the user, log theerror.code, and take the appropriate action (e.g. ask the user to recheck their account number). -
status: errorhandled with retry logic —PROVIDER_ERRORandPROVIDER_TIMEOUTare transient. Implement exponential backoff with a maximum retry count. Do not surface these as permanent failures to end users. -
Async verifications: webhook or polling fallback implemented — if you use
mode: async, you must handle the result asynchronously. Ensure your webhook endpoint is registered, reachable, and processing events correctly. Optionally, implement a polling fallback usingGET /verify/VERIFICATION_IDfor cases where the webhook delivery fails. -
VERIFICATION_IDstored for each async request — store theidfrom everypendingresponse in your database so you can correlate the incoming webhook event with the original request and update your records accordingly.
Webhooks
-
Webhook URL uses HTTPS — HTTP endpoints are not accepted. The URL must begin with
https://. -
Webhook URL is publicly reachable —
localhost, private IP ranges, and internal network addresses are not permitted. Confirm your endpoint is accessible from the public internet before registering it. -
X-Signatureverified on every incoming delivery before processing — compute HMAC-SHA256 over the raw request body using your webhook secret and compare it to theX-Signatureheader using a constant-time comparison. Reject any request that fails verification with401. See Webhooks for code examples in Node.js and Python. -
Webhook handler returns
200immediately, processes events asynchronously — do not perform database writes, external API calls, or other slow operations in the synchronous request handler. Return200 OKimmediately and hand the payload off to a background job or queue. Long-running handlers cause timeouts that trigger unnecessary retries. -
Duplicate delivery handling implemented — Lira may deliver the same event more than once when retrying. Store the delivery
idand skip processing if you have already handled it. -
Re-enable logic in place for when webhook status becomes
failed— if all retry attempts are exhausted, Lira sets the webhook status tofailedand stops delivering events. Implement monitoring to detect this state (e.g. alert whenGET /client/webhooksreturns a webhook withstatus: failed) and re-enable it viaPATCH /client/webhooks/WEBHOOK_IDwith{ "status": "active" }.
Error handling
-
All HTTP status codes handled — your code must handle
400,401,403,404,422,429, and500. Do not treat all non-200responses the same way. -
Verification error codes handled per type — at minimum:
ACCOUNT_NOT_FOUND,INVALID_BANK_CODE,INVALID_ACCOUNT_NUMBER,SUBSCRIBER_NOT_FOUND,INVALID_PHONE_NUMBER,INVALID_NETWORK_CODE,NETWORK_CODE_REQUIRED,PROVIDER_ERROR,PROVIDER_TIMEOUT. See Errors for the full reference. -
429rate limit handled with retry-after backoff — when you receive a429, read theRetry-Afterresponse header and wait the specified number of seconds before retrying. Do not retry immediately in a tight loop.
Security
-
API keys not exposed in client-side code, logs, or version control — API keys in browser JavaScript, mobile app binaries, or git history can be extracted and abused. All verification calls must originate from your server side.
-
Webhook secret stored securely — store the webhook signing secret in an environment variable or secrets manager. It must not appear in source code or logs.
-
HTTPS used for all API requests — all requests to
https://api.lira.comuse TLS. Do not disable certificate verification in your HTTP client.
Go live
Once all items above are checked:
-
Swap
YOUR_API_KEYto your live key. Update the environment variable in your production deployment — no code changes required. -
Update your webhook URL if you registered a sandbox or tunnel URL (e.g. ngrok). Ensure the production URL is HTTPS and publicly reachable.
-
Make one real verification call to confirm everything works end-to-end. Use a known-good account number or phone number and verify the response is
status: successwith correct account details. -
Monitor your first few live verifications in the dashboard. Check that webhook deliveries are succeeding and that your error handling is working as expected in production conditions.