Skip to main content
You can manage your entire billing lifecycle through the API or the console. This guide covers how to list plans, estimate costs, create a checkout session, check your subscription, attach add-ons, and cancel when needed.

Prerequisites

  • A Truthlocks account with an active tenant.
  • An API key with billing permissions. See API keys to create one.

Choose a plan

Truthlocks offers five plan tiers. Use the plans endpoint to fetch the full catalog — this is a public endpoint and does not require authentication.
See billing overview for a comparison of all plans.

Estimate your costs

Before subscribing, use the estimate endpoint to get a plan recommendation based on your expected usage. This is also a public endpoint.
The response includes a recommended plan and estimated monthly total. For a line-item cost breakdown, use the projected invoice endpoint instead.

Check your current rates

Your tenant’s effective per-use rates depend on your rate card and region. Fetch them with:
The response includes base rates and any regional pricing adjustments:
If your organization has a custom rate card assigned by a platform admin, those rates appear here instead of the defaults.

Subscribe to a plan

Create a checkout session to start or upgrade your subscription. The billing service selects the correct payment provider for your region automatically.
1

Create a checkout session

Call the checkout endpoint with the plan you want and redirect URLs:
The response contains a checkout_url hosted by the payment provider.
2

Redirect to checkout

Send the user to the checkout_url to complete payment.
3

Confirm the subscription

After payment, verify the subscription is active:
You can optionally pass a provider parameter (stripe, paystack, or flutterwave) to override automatic region-based routing. See provider routing for details.

Attach add-ons

Add-ons extend your plan with extra capabilities. Attach them via the API:
If the add-on has a price, the response includes a checkout_url to complete payment. Free add-ons activate immediately.
Add-on prices adjust automatically based on your organization’s billing country. Tenants in lower-cost regions pay a reduced rate — for example, the Compliance Pack costs 149.50/monthinNigeria(0.5xmultiplier)insteadofthe149.50/month in Nigeria (0.5x multiplier) instead of the 299 base price. See regional add-on pricing for the full tier table.
To remove an add-on:
See manage add-ons for the full add-on catalog and response details.

Monitor usage

Track your current billing cycle consumption to stay within your plan limits:
To check whether a specific operation is within quota before performing it:

Open the billing portal

Redirect users to their payment provider’s self-service portal to update payment methods, view invoices, or manage their subscription:
The response includes a portal_url. Redirect the user to that URL. Portal sessions expire quickly, so generate a fresh URL each time.

Cancel a subscription

To cancel, call the cancel endpoint. The cancellation takes effect at the end of the current billing period — you keep full access until then.
After the period ends, your account downgrades to the Developer (free) plan. To resubscribe, create a new checkout session.
You cannot undo a cancellation via the API. To resume your subscription, you need to go through checkout again.

Billing overview

Plan tiers, rates, entitlements, and add-ons.

Provider routing

How payments are routed by region.

Billing API reference

Full billing API endpoint reference.

Entitlements

Check your active features and quotas.