Navigation

Retainer Billing with Variable Amounts

Charge retainer clients based on actual work delivered

Goal: Bill retainer clients a variable amount each month based on hours worked or services delivered. The amount changes each cycle, the billing infrastructure stays the same.

What You'll Need

Trigger Billing (Variable mode, off_session) — Threshold validates condition, amount passed at fire time
Billing Customers — Client's payment identity and stored method
Fire Trigger API — Your system fires with calculated amount

Steps

Create a retainer item

Edge > Billable Items > New Item. Trigger type. Mode: Variable, Capture: Charge Immediately, Condition: >=, Threshold: 1 (any hours), Price: $2,000 (default), Allow Override: Yes, Max Capture: $15,000.

Set up the client

Create billing customer with payment method and trigger permissions.

Enroll the client

Enroll in the retainer item. Stays active month after month.

Calculate monthly amount

At end of each billing cycle, calculate: hours worked x hourly rate. Example: 47 hours x $150/hr = $7,050.

Fire with the amount

Call the fire endpoint:

`POST /apis/edge/trigger/fire.php`
`{"billable_item_id": "bi_xxx", "billing_customer_id": "bc_xxx", "override_amount": 7050.00}`

Or click Charge Now and enter $7,050. Edge charges immediately.

Automate with a cron or Flow

Set up a scheduled job that calculates each client's amount and fires the trigger via API monthly. Removes the manual step.

Result

Each cycle, the retainer client is charged the exact amount for work delivered. The amount varies, the billing process does not.

Variations

Client-confirmed retainer

Use client_confirm instead. Client receives monthly invoice with hours breakdown and approves. More oversight.

Minimum retainer with overage

Set bi_unit_price to minimum (e.g., $2,000). Only pass override_amount when actual exceeds minimum.

Tip: Variable mode requires bi_allow_amount_override = 1. The override_amount is capped by bi_max_capture_amount — set high enough for your largest expected charge but low enough to catch errors.

Was this article helpful?

NotebookLM Overviews