1. Prepare the account
The agent first looks for an existing Infi integration in the app. If there is one, it reuses that account. For a new integration, it asks for an email, the app name and the billing intent. With the answers it callsinfi_onboard or
makes the POST below with the real values:
apiKeySecret (sk_test_*, once only), publishableKey
(pk_test_*), accountName, tenantSlug, expiresAt, the seed productId and
the claimUrl (https://app-sandbox.beinfi.com/claim/{id}). The
ref: "lovable" is what marks the tenant’s signup_source. Field by field in
quickstart.
2. Keep the link to finish later
The agent hands theclaimUrl back and continues the integration in the
sandbox. With the claim-email update, supplying an address also queues a notice
with the account name, the link and the deadline. Delivery is asynchronous and
limited to one notice per address every 24 hours. The email does not contain the
keys; 201 confirms creation, not delivery.
You sign in to Infi later, through the link from the conversation or the email,
and take over the same account. The default window is 30 days; the returned
expiresAt is what counts. The name is already filled in, and products, keys
and slug are preserved. Do not create another account if the email is slow.
Details in Claim.
3. Env in the Lovable app
INFI_SECRET_KEY in your server functions’ secrets. Only
INFI_PUBLISHABLE_KEY may be exposed in the browser when a client API requires
one; it is Infi’s, not the payment provider’s. Never expose the secret in a
VITE_* variable. The agent needs neither your password nor a verification
code.
Do not set INFI_AUTH_BASE_URL / INFI_PAY_BASE_URL — they are legacy and
nothing reads them. The hosts come from the key’s prefix.
4. Create the product
The seed product is good for neither selling nor metering (version indraft,
no meter). Create and publish your own — three calls in
catalog. Keep the productId: it goes into the payment
link, checkout() and every usage event.
5. Integrate the SDK
Infi does not log your user in — use the auth the app already has (Supabase, in the typical Lovable case) and pass that id to Infi.503
with a test key.