Test & Live
Portal toggle for the dashboard, API keys for your app, and checkout follows the key that created the session.
How mode is chosen
| Surface | What selects Test vs Live |
|---|---|
| Merchant portal | Test / Live toggle (separate products, keys, webhooks, customers) |
| Your app / SDK | AUTLANTIC_BILLING_API_KEY (abk_test_… or abk_live_…) |
| Hosted checkout | Mode stamped on the subscription/payment when created |
Do not rely on AUTLANTIC_BILLING_SANDBOX to flip hosted Test/Live. That env is for local in-process sandbox or rare platform overrides.
Chains
| Mode | Network |
|---|---|
Test (abk_test_…) | Base Sepolia |
Live (abk_live_…) | Base mainnet |
Hosted API (recommended path)
- In the portal, switch to Test.
- Create products, prices, a test API key, and a test webhook endpoint.
- Put the test key and that endpoint’s signing secret in staging:
bash
export AUTLANTIC_BILLING_API_URL=https://billing.autlantic.com
export AUTLANTIC_BILLING_API_KEY=abk_test_…
export AUTLANTIC_BILLING_MERCHANT_ID=mer_…
export AUTLANTIC_BILLING_WEBHOOK_SECRET=whsec_… # Test endpoint secret- Create a subscription and open
checkoutUrl. The badge should read Test · Base Sepolia. - For production, repeat in Live with
abk_live_…and the Live endpoint secret.
In-process sandbox (no hosted API)
Useful for unit demos and CI without network:
ts
import { AutlanticBilling } from "@autlantic/payments-recurring";
const billing = AutlanticBilling.sandbox({ merchantId: "mer_demo" });Or:
bash
export AUTLANTIC_BILLING_SANDBOX=1ts
const billing = AutlanticBilling.fromEnv(); // no apiBaseUrl → in-processWhat to test
- Create a subscription with a test key and catalog
priceId. - Open hosted checkout and complete Test activation.
- Create a payment link, open
/checkout/link/:id, complete pay. - Confirm renewals, cancel, refund, and void in Test.
- Verify webhook signatures with the Test endpoint secret.
- Repeat with a live key only after Test looks good (real USDC on Base).
Monorepo commands
bash
pnpm check:recurring-sdk
pnpm --filter @autlantic/payments-recurring example
pnpm test:e2e:recurring-billing
pnpm test:e2e:payment-links
pnpm dev:billing-api
pnpm dev:billing-workerMore detail: package TESTING.md under packages/payments-recurring.
Going live
- Portal → Live: products, live API key, live webhook endpoint.
- Production env:
abk_live_…+ Live endpointwhsec_…. - Do not set
AUTLANTIC_BILLING_SANDBOXin production. - Confirm hosted checkout shows Live · Base.
- Run
billing-workerfor due renewals (Autlantic ops / your deploy).