Sandbox & testing
Use sandbox mode before mainnet. No real USDC is required for in-process demos.
In-process sandbox
ts
import { AutlanticBilling } from "@autlantic/payments-recurring";
const billing = AutlanticBilling.sandbox({ merchantId: "mer_demo" });Or via env when talking to a remote Autlantic billing API:
bash
export AUTLANTIC_BILLING_SANDBOX=1ts
const billing = AutlanticBilling.fromEnv();What to test
- Create a subscription with a test wallet and payout address.
activateSubscription(sandbox completes mandate + first charge).chargeInvoicefor later renewals (not the same first invoice after activate).- Cancel, refund, and void flows.
- Webhook signature verification with your secret.
Repo commands
From the root of this repository:
bash
pnpm check # build + unit tests
pnpm example # sandbox demoMore detail: packages/payments-recurring/TESTING.md.
Going live
- Set
AUTLANTIC_BILLING_SANDBOXoff (or remove it). - Point at Base mainnet chain config and live USDC.
- Set
AUTLANTIC_BILLING_API_URLto the base URL Autlantic issues with your API key, and use Autlantic’s hosted renewals worker, or run a compatible API yourself. - Verify webhooks with
x-autlantic-signature.