Metered billing lets you charge customers based on what they consume in a billing period - API calls, active seats, storage used, or any other unit you define. At the end of each period, PayBridgeNP aggregates the usage records and issues an invoice for the accumulated amount.Documentation Index
Fetch the complete documentation index at: https://docs.paybridgenp.com/llms.txt
Use this file to discover all available pages before exploring further.
Create a metered plan
SetbillingScheme to "metered" and choose an aggregationMethod:
sum- total usage across all records in the period (default)max- the single highest usage value reportedlast_ever- the most recent value ever reported (useful for high-water-mark billing)
amount is the unit price in paisa. The invoice is amount × aggregated_quantity.
Report usage
CallreportUsage after each usage event, or batch at intervals:
action: "set" to report the absolute current value instead of adding to the running total (useful with max or last_ever aggregation).
Check current usage
How invoicing works
At the end of each billing period, PayBridgeNP:- Aggregates all usage records for the period using the plan’s
aggregationMethod - Multiplies the result by the plan’s
amount(unit price) - Generates an invoice for that total
- Resets the usage counter for the next period
Per-seat billing
For per-seat (quantity-based) billing where you charge a flat rate multiplied by the number of seats, usebillingScheme: "per_unit" (the default) and update the quantity when seats change: