What is Trigger Billing?
Charge customers when a condition is met, not on a calendar schedule
What It Is
Trigger billing charges a customer when a condition is met, not on a schedule. You define the condition — a wallet balance dropping below a threshold, API usage crossing a limit, a project milestone completed — and Edge fires the charge when that condition occurs.
There are four trigger modes that determine how the condition and amount work together: Fixed (amount and threshold locked), Variable (threshold locked, amount passed at fire time), Event (no threshold, fires on demand), and Threshold (amount locked, caller passes the metric value).
There are two capture modes that determine how payment is collected: Off-session charges the stored payment method immediately with no client interaction. Client confirm creates an invoice with a Pay Now link and sends it to the client for approval.
Why It Matters
Subscriptions handle calendar-driven billing well — charge $99 on the first of every month. But many real business scenarios are not calendar-driven.
A customer's wallet drops below $15 — that is not a date, it is a condition. A project milestone is completed — that is not a schedule, it is an event. API usage spikes past 10,000 calls — that is a metric crossing a threshold.
Without trigger billing, these scenarios require custom code, Zapier chains, or manual invoicing. With Edge, you define the condition once on a billable item and let the system handle the rest.
Zyntro uses trigger billing internally. When your Zyntro wallet balance drops below $15, Edge fires a trigger charge to top it up — the same API, the same infrastructure. Zyntro eats its own cooking.
How It Works
The trigger billing flow has five steps:
1. Create a trigger billable item. This defines the condition, amount, trigger mode, and capture mode.
2. Create a billing customer with trigger permissions enabled and a verified payment method.
3. Enroll the customer in the trigger item. This creates the link between the customer and the billing rule.
4. Fire the trigger when the condition is met. Either your system calls POST /apis/edge/trigger/fire.php or someone clicks Charge Now in the Edge UI.
5. Edge processes the charge. For off_session: charges the stored payment method, records revenue, fires a trigger.captured webhook. For client_confirm: creates an invoice with Pay Now, emails it to the client.
Safety mechanisms: a 60-second cooldown prevents duplicate charges, auto-pause after 3 consecutive failures protects against broken payment methods, and configurable max capture amounts limit charge size.
Examples
Wallet auto-topup
A SaaS platform monitors customer wallet balances. When a balance drops below $15, the platform calls Edge's fire endpoint. Edge charges $200 to the stored card and fires a trigger.captured webhook. The platform's handler credits the wallet. No human involvement.
Milestone billing
A design agency completes a website mockup. The project manager opens Edge and clicks Charge Now. They enter $2,500 and 'Phase 2: Homepage mockups delivered' as the description. Edge sends the client an invoice with a Pay Now button. The client reviews, approves, and pays.
Metered API billing
A developer platform tracks API calls per customer. When usage crosses 10,000 requests, the system fires the trigger with metric_value=10247. Edge evaluates 10,247 >= 10,000 and charges the $50 overage fee automatically.