Navigation

Setting Up Trigger Billing

Create a trigger item, enroll a customer, and fire your first charge

Before You Begin

This guide walks through trigger billing setup from scratch. You will create a trigger billable item, set up a billing customer with trigger permissions, enroll the customer, and fire your first charge.

Steps

Create a Trigger Billable Item

Navigate to Operations > Edge > Billable Items and click New Item.

Set billing type to Trigger. Configure:
- Trigger Mode: Fixed
- Capture Mode: Charge Immediately (off_session)
- Condition: <= (lte)
- Threshold: 15.00
- Unit Price: 200.00

The description auto-generates: 'When value <= $15, charge $200'. Click Save.

Note the API Sample

After saving, an API Sample panel appears showing the exact API call to fire this trigger with your `billable_item_id` pre-filled. Copy the `billable_item_id` for later.

Create a Billing Customer

Navigate to Edge > Billing Customers and click New Customer.

Select a contact. Choose your gateway (Stripe or PayPal). Enter payment method details.

Enable Allow Trigger Billing. Set initial charge to $15.00. Click Save.

Edge processes the initial charge. On success, status moves to `active`.

Enroll the Customer

Open the billing customer profile. In Enrollments, click Enroll.

Select the trigger item from Step 1. Click Confirm Enrollment. The enrollment is now `active`.

Fire from the UI

Click Charge Now on the billing customer profile. Select the trigger item. For Fixed mode, the amount is locked at $200. Click Charge Now.

Edge charges the stored payment method. The result appears immediately.

Fire via API

Alternatively, call the API:

POST /apis/edge/trigger/fire.php

With billable_item_id and billing_customer_id in the request body. The response includes charge status, amount, and gateway reference.

Verify the Charge

Check three places:

1. Billing Customer Profile — charge appears in history
2. Revenue Dashboard — payment shows with source `trigger`
3. Webhook Logs — `trigger.captured` event if webhooks are configured

Go to Production

For production, integrate the fire endpoint into your application. Your system monitors the condition and calls the fire endpoint when met. Edge handles charging, revenue, webhooks, and failure management.

Result

You have set up trigger billing end-to-end. The customer is enrolled and charged. Fire this trigger programmatically via the API whenever your condition is met.

Tip: For testing, use a Stripe test card (4242 4242 4242 4242). The entire flow runs identically — charges, revenue, webhooks — but no real money moves.

Continue Reading

Was this article helpful?

NotebookLM Overviews