Skip to content

Integration

HTTP API

Hosts, authentication, idempotency and the API route reference.

The SDK is a client of Infi's HTTP API. Use these endpoints from your own language or when debugging a request.

Environments

EnvironmentAPIHosted checkout
Sandbox (sk_test_)https://api-sandbox.beinfi.comhttps://app-sandbox.beinfi.com
Production (sk_live_)https://api.beinfi.comhttps://app.beinfi.com

Use the correct host for the key. Sandbox resources do not exist in production.

Authentication

curl https://api-sandbox.beinfi.com/metering/products \
  -H "Authorization: Bearer $INFI_SECRET_KEY"

Use Authorization: Bearer, not X-Api-Key. Keep secret keys server-side. Public checkout routes under /pay/{slug} do not take a merchant secret key.

Agent provisioning

POST /public/v1/claimables is public and accepts optional ref, accountName and email. It returns apiKeySecret, publishableKey, tenantSlug, productId, claimUrl and expiresAt. Email is an unverified contact, never an identity. With the claim-email update, providing an address queues a transactional message with the link and deadline, at most once per address every 24 hours. A 201 confirms provisioning, not email delivery. Always preserve the returned claim URL.

Read agent onboarding for questions, credentials and human handoff. Do not blindly repeat this POST after a lost response: the account may already exist.

Idempotency

Authenticated mutations require an Idempotency-Key. Use a stable, unique value for each operation and reuse it only when retrying that same operation.

curl -X POST "https://api-sandbox.beinfi.com/metering/products/$PRODUCT_ID/payment-links" \
  -H "Authorization: Bearer $INFI_SECRET_KEY" \
  -H "Idempotency-Key: create-link-for-order-123"

This requires a published product. Creating a link does not charge a customer. Missing keys return 400 idempotency_key_required; reusing a key with a different body returns 409 idempotency_key_reused.

Public bootstrap routes have their own requirements. Do not assume every public route needs a merchant key or uses the same request shape.

Responses and errors

Collection reads return envelopes such as {"products": [...]} . Resource creation may return a composite response: product creation returns both product and a draft version. Check the endpoint contract instead of assuming every resource is at the root.

Errors may use the handler envelope (error_code, message, errors, tracer_id) or the middleware envelope (error.code, error.message, error.request_id). Preserve diagnostic IDs when reporting a problem.

Routes

The tables below are generated from the backend OpenAPI contract. Provider capabilities and Early access availability still apply; an endpoint's presence is not a promise that every connected provider supports its operation.

Catalog and customers

MethodRoute
GET · POST/metering/customersList tenant customers
GET/metering/customers/{customerID}Get tenant customer detail or legacy enrollment by ID
GET · POST/metering/customers/{customerID}/creditGet a customer's credit balance and ledger entries
POST/metering/customers/{customerID}/credit/consumeConsume (deduct) credit from a customer
GET · POST/metering/customers/{customerID}/rate-cardsList a customer's rate cards
DELETE/metering/customers/{customerID}/rate-cards/{rateCardID}Delete a rate card
GET/metering/customers/{customerID}/stateSingle-read customer state (enrollment, credit, subscriptions, usage)
GET/metering/customers/{customerID}/walletGet meter wallet balances for an enrollment
POST/metering/customers/{customerID}/wallet/creditCredit a meter balance
POST/metering/customers/{customerID}/wallet/debitDebit a meter balance
POST/metering/eventsIngest a single usage event
POST/metering/events/batchIngest a batch of usage events (all-or-nothing)
GET/metering/overviewTenant KPI summary for the dashboard overview
GET · POST/metering/productsList products
GET · PATCH/metering/products/{productID}Get a product
GET · POST/metering/products/{productID}/customersList product enrollments
GET/metering/products/{productID}/customers/{enrollmentID}Get a product enrollment by enrollment ID
GET · PUT · DELETE/metering/products/{productID}/deliverableGet a product's deliverable metadata
POST/metering/products/{productID}/deliverable/presignPresign an R2 upload URL for a file deliverable
GET · POST/metering/products/{productID}/metersList meters of a product
PATCH/metering/products/{productID}/meters/{meterID}Update a meter's display name / unit / aggregation
GET · POST/metering/products/{productID}/payment-linksList a product's payment links
DELETE/metering/products/{productID}/payment-links/{linkID}Revoke a payment link
GET · POST/metering/products/{productID}/versionsList versions of a product
PUT/metering/products/{productID}/versions/{versionID}/commitmentSet a committed minimum on a version
PUT/metering/products/{productID}/versions/{versionID}/entitlementsReplace the complete entitlement snapshot of a draft version
GET · POST/metering/products/{productID}/versions/{versionID}/pricesList prices on a version
POST/metering/products/{productID}/versions/{versionID}/publishPublish a draft version (makes pricing immutable)
GET/metering/usageGet usage totals for a customer

Billing and payments

MethodRoute
GET · POST/billing/couponsList the tenant's coupons
GET · PATCH · DELETE/billing/coupons/{couponID}Get a coupon
GET/billing/customers/{customerID}/invoicesList a customer's invoices
GET/billing/customers/{customerID}/payment-methodsList a payer's stored payment methods
DELETE/billing/customers/{customerID}/payment-methods/{instrumentID}Remove a stored payment method
POST/billing/customers/{customerID}/payment-methods/{instrumentID}/defaultMake a stored payment method the payer's default
GET/billing/customers/{customerID}/subscriptionsList a customer's subscriptions
GET · POST/billing/invoicesList all invoices for the tenant
GET/billing/invoices/{invoiceID}Get an invoice
POST/billing/invoices/{invoiceID}/chargeCharge an open invoice via the PSP
GET/billing/invoices/{invoiceID}/deliverableList the download grants an invoice's payments produced
GET/billing/invoices/{invoiceID}/invoice.pdfGet an invoice PDF
GET/billing/invoices/{invoiceID}/paymentsList payments against an invoice
GET/billing/invoices/{invoiceID}/receipt.pdfGet an invoice receipt PDF
POST/billing/invoices/{invoiceID}/sendFinalize and send an invoice
POST/billing/invoices/{invoiceID}/uncollectibleMark an invoice uncollectible
POST/billing/invoices/{invoiceID}/voidVoid an invoice
POST/billing/invoices/from-usageGenerate an invoice from an enrollment's accrued usage (on demand)
GET/billing/paymentsList all payments for the tenant
GET/billing/payments/{paymentID}Get one payment
POST/billing/payments/{paymentID}/refundRefund a payment (full or partial)
GET/billing/payments/{paymentID}/refundsList the refunds recorded against a payment
POST/billing/products/{productID}/invoicesPurchase a product — enroll the customer and open a finalized invoice
POST/billing/products/{productID}/subscriptionsCreate a subscription for a customer
GET · PUT/billing/settingsGet the tenant's collection settings
GET/billing/subscriptionsList all subscriptions for the tenant
GET · PATCH/billing/subscriptions/{subscriptionID}Get a subscription
GET · POST/billing/subscriptions/{subscriptionID}/alertsList usage alerts on a subscription
DELETE/billing/subscriptions/{subscriptionID}/alerts/{alertID}Delete a usage alert
POST/billing/subscriptions/{subscriptionID}/invoicesGenerate an invoice for the subscription's current ended period
GET/billing/subscriptions/{subscriptionID}/periodsList billing periods of a subscription

Account

MethodRoute
GET · POST/account/api-keysList API keys
DELETE/account/api-keys/{keyID}Revoke an API key
GET · POST/account/notification-subscriptionsList notification subscriptions
PATCH · DELETE/account/notification-subscriptions/{subscriptionID}Activate or deactivate a notification subscription
GET/account/notifications/deliveriesList notification delivery audit records
GET/account/planEffective plan, approved payment volume, invoice projection and entitlements
POST/account/plan/activateAccept the current Terms and activate a postpaid live plan
POST/account/plan/downgradeSchedule a paid self-service tier to Free at the next cycle boundary
POST/account/plan/upgradeConfirm Scale as the account's minimum economic tier
GET · PATCH/account/tenantGet the authenticated tenant
GET · POST/account/webhooksList webhook endpoints
GET · PATCH · DELETE/account/webhooks/{endpointID}Get a webhook endpoint
POST/account/webhooks/{endpointID}/rotate-secretRotate a webhook endpoint's signing secret
GET/account/webhooks/deliveriesList webhook delivery audit records

Public — no merchant key

MethodRoute
GET/pay/{slug}/download/{token}Redeem a tokenized digital-product download (unauthenticated)
GET/pay/{slug}/invoices/{invoiceID}Public hosted-checkout invoice read (unauthenticated)
POST/pay/{slug}/invoices/{invoiceID}/chargeInitiate payment on a public checkout invoice (unauthenticated)
POST/pay/{slug}/invoices/{invoiceID}/couponApply a coupon to a public checkout invoice (unauthenticated)
GET/pay/{slug}/invoices/{invoiceID}/invoice.pdfPublic hosted-checkout invoice PDF (unauthenticated)
GET/pay/{slug}/invoices/{invoiceID}/payments/{paymentID}Read authoritative public payment status (unauthenticated)
GET/pay/{slug}/invoices/{invoiceID}/receipt.pdfPublic hosted-checkout receipt PDF (unauthenticated)
GET/pay/{slug}/links/{token}Resolve a payment link for display (unauthenticated)
POST/pay/{slug}/links/{token}/checkoutMaterialize an invoice from a payment link (unauthenticated, legacy)
POST/pay/{slug}/links/{token}/sessionsOpen (or reuse) a checkout session for a payment link (unauthenticated)
GET/pay/{slug}/links/{token}/sessions/{sessionID}Read a checkout session (unauthenticated)
POST/pay/{slug}/links/{token}/sessions/{sessionID}/chargeMaterialize the invoice and charge a checkout session (unauthenticated)
GET/pay/{slug}/links/{token}/sessions/{sessionID}/payments/{paymentID}Read authoritative link-session payment status (unauthenticated)
GET/public/platform-plansPublished Infi platform plans for the landing and calculators
POST/public/v1/claimablesProvision a claimable tenant (instant creds, claim later; no auth)
GET/public/v1/claimables/{claimableID}Public claimable-tenant status (no secrets)

Operations — sessions and inbound webhooks

MethodRoute
POST/auth/claimables/{claimableID}/claimClaim a provisional tenant to the signed-in user
POST/auth/cli/tokenExchange dashboard session for CLI API key
POST/auth/session/bootstrapProvision tenant on first dashboard signup
POST/auth/session/onboarding/completeMark tenant onboarding complete
POST/auth/session/syncSync dashboard session with backend membership
POST/webhook/provider/payments/webhookInbound PSP webhook (authenticated by the gateway signature)
POST/webhook/provider/webhooks/{provider}/{externalAccountID}/{token}Inbound webhook for a provider whose deliveries are not self-authenticating
POST/webhook/provider/webhooks/adyen/{externalAccountID}Inbound Adyen Standard webhook

Integration guides