Skip to main content
Start with a test key. Sandbox payments do not move real money. Keep secret keys on your server, never in a browser bundle or source control. Integrating with an AI agent? Start with agent onboarding. It collects your email, app name and billing intent, then prepares the environment and returns a link to finish registration in Infi.

1. Create a sandbox

In a new project directory, run:
The CLI provisions a sandbox, writes infi.company.ts and .env.local, syncs an example one-time product with a published version, and runs its checks. Review the generated catalog and price before using it. Save the returned claim URL: opening it lets you claim ownership of the tenant. The default claim window is 30 days; use the returned expiresAt as the deadline. Do not commit the generated secret key. With the claim-email update, provisioning with an email also queues the claim link for delivery, at most once per address every 24 hours. Always keep the returned link; provisioning success does not confirm email delivery. The bootstrap command above does not supply an email. If you only need a sandbox key, without generating project files:
That second command does not give you a ready-to-sell product. The seed product is a draft; create and publish your own product before creating a payment link. The detailed catalog guide has the three calls.

2. Install the SDK

Load INFI_SECRET_KEY and INFI_TENANT_SLUG from the generated environment file in your server runtime. Then:
Test keys (sk_test_) select the sandbox API and checkout. Live keys (sk_live_) select production. You do not need to set a base URL. After the one-time bootstrap, use the published item product:
Open the returned URL. The customer and invoice are created when the buyer submits checkout. A payment link is not proof that a payment succeeded. The route is selected at payment time from compatible providers. For live payments, connect your own supported provider account first.

4. Confirm the result

In the sandbox, use the test checkout and poll the invoice. Once you have the invoice ID:
true means the invoice is paid; false means polling timed out. Use signed webhooks for production. Sandbox webhook registration currently depends on a secret store that may be unavailable; polling is the documented sandbox path.

5. Go live

Claim your tenant, connect a provider account, register your webhook endpoint and use a live key. Check provider status in your dashboard before accepting payments. Existing saved cards, subscriptions and provider-specific code are not automatically migrated when you connect a provider. The Stripe-compatible SDK is a separate Early access surface; the examples here use @beinfi/sdk. Read the SDK guide for idempotency and the HTTP API reference if you use another language.