Skip to main content
Four steps from zero to billing. This guide walks through the essential Paygentic setup. A sandbox environment is available at platform.sandbox.paygentic.io for risk-free testing with identical credentials.
Using Claude Code? Install the Paygentic skills plugin first so Claude can generate the integration code as you read along.
1

Define a product

A product represents the service you sell. Give it a clear name (e.g., “LLM Inference Engine”, “Vision AI Platform”), a description, and associate it with your merchant account. You can create products through the API or the dashboard.See Products for the full reference.
2

Set up pricing

With a product in place, configure three things: what you measure, how you price it, and how you package it.Billable metrics define the units you track — input tokens, output tokens, GPU minutes, API calls, or anything else your service meters.Prices attach a standard pricing model to each metric — including percentage-style multipliers and revenue share (a unit price of 0.1 charges 10% of the metered value). Each price also carries a payment term: in_advance for upfront charges like platform fees, or in_arrears for metered usage billed at period end.Plans bundle your prices into a subscribable offering. Every plan has a billing cadence (monthly, quarterly, or yearly), a currency, and a set of prices.See Billable Metrics, Prices, and Plans for details on each.
3

Create a customer and subscribe

Create a customer for each organization you bill, then create a subscription to connect that customer to a plan.If the plan includes in-advance charges, Paygentic generates an initial invoice covering the first period’s upfront fees. The subscription activates once that invoice is paid. If the plan has no upfront fees, there is nothing to collect and the subscription activates immediately.See Customer Lifecycle for the full activation flow.
4

Report usage

Once the subscription is active, send meter events to record consumption. Send each event to POST /v0/events with type (the billable metric’s eventType), subject (the customer ID), source (where the event came from) and data (the values to measure, such as a quantity). If you don’t have the Paygentic customer ID, send your own ID in externalSubject instead of subject.This example assumes a billable metric whose eventType is ai.inference and whose valueProperty is $.tokens. Without a matching metric, the call returns 422.
Paygentic returns 202 Accepted for an event that is well-formed, names a customer with subject or externalSubject, and has a type that matches a billable metric or cost metric. See Error handling for the other responses. Send an idempotencyKey with every event you might retry. On a 5xx response, retry with the same idempotencyKey, and wait the Retry-After time on a 503. On a 429, follow Rate limits.See Meter Events for the event schema and examples.
Setup complete. Continue with the Pricing Overview for a deeper look at how products, metrics, prices, and plans fit together.