Trigger charges from your backend with one HTTP call
Create charges for your customers from any backend event—API calls, product actions, internal tools, or scheduled jobs. You send the final amount; we record the charge and feed it into payouts.
Create charges from any endpoint
API Billing lets your backend create charges for your customers using a single HTTP endpoint. You define Flows to group charges (per product, feature, or API), send us the final amount when something should be billable, and see everything in one place in your dashboard and payouts.
Works for API calls, web/app actions, webhooks, and internal tools
You keep full control over how you calculate price
We keep the transaction record that payouts and invoicing can use
No plan editor, no metering engine, no subscription builder—just a simple charges API.
Use it whenever your backend already knows the price
Ideal when you:
Already calculate what to charge inside your backend or product logic
Want a clean way to record charges per customer and per feature
Need a source of truth for what should be paid out without rebuilding your billing model
Have multiple surfaces (API, web app, admin panel, cron jobs) that can all create charges
You decide
when and how much to charge.
We provide
a consistent way to send and track those charges.
Three steps to wire it in
How API Billing fits into your system
Create a Flow in the dashboard, like "Pro workspace usage", "Image processing", or "One-off reports".
Use the server-side key from your Orvion account.
When something happens that should be billable—an API call, a button click, a cron job—you call:
We store the transaction and connect it to your payouts.
One endpoint for charges from any workflow
You calculate the price where it belongs (in your app). The API Billing endpoint just records the charge and ties it to a Flow and a customer.
POST/v1/flows/{flow_id}/charges1FLOW_ID="flow_123"2API_KEY="$AGENTPAY_API_KEY"34curl -X POST "https://api.orvion.com/v1/flows/$FLOW_ID/charges" \5 -H "Authorization: Bearer $AGENTPAY_API_KEY" \6 -H "Content-Type: application/json" \7 -d '{8 "amount": 100,9 "currency": "EUR",10 "customer_ref": "user_123",11 "reference": "image-job-987",12 "metadata": {13 "job_id": "987",14 "tier": "pro",15 "source": "api-endpoint:/v1/images/transform"16 }17 }'
amountfinal amount to charge
currencyISO code (e.g. "EUR")
customer_refyour internal identifier (user, account, workspace, etc.)
referencehuman-readable reference for this charge (job id, order id, etc.)
metadataoptional JSON for whatever context you need (endpoint, feature, region, etc.)
Call it from any backend
Example SDK usage
1import { OrvionClient } from "@orvion/sdk";23const client = new OrvionClient({4 apiKey: process.env.AGENTPAY_API_KEY!5});67async function recordCharge() {8 const txn = await client.billing.createCharge({9 flowId: "flow_123",10 amount: 100,11 currency: "EUR",12 customerRef: "user_123",13 reference: "checkout-order-456",14 metadata: {15 source: "web-app",16 feature: "pro-plan-upgrade"17 }18 });1920 console.log("Charge created:", txn.id, txn.status);21}2223recordCharge().catch(console.error);
Works the same way whether the trigger is:
See all charges by flow, customer, and source
- Create and name flows per product, feature, or API surface.
- See which flows are active and when they last created a charge.
- Pause a flow to stop new charges while keeping history.
- Filter by flow, customer, status, date range.
- Inspect each charge with full metadata (including which endpoint or workflow created it).
These transactions are the basis for: Payouts – what should be paid out to you. Invoicing – if you generate invoices on top of actual charge data.
Common questions
Start recording charges from your backend
Create a Flow, plug a single HTTP call into your existing logic, and start tracking charges from any endpoint, product action, or internal workflow.