Prerequisites: You need a Lava merchant account with a configured meter and the Node.js SDK installed. For disable billing, you also need an existing customer.
When to Use Each Mode
| Mode | Token params | Customer charged? | Customer tracked? | Use case |
|---|---|---|---|---|
| Meter-only | meter_slug only | No | No | Internal tools, cost attribution, analytics |
| Disable billing | customer_id + meter_slug + disable_billing | No | Yes | Free trials, testing, promotional requests |
Meter-Only Mode
Pass only ameter_slug when generating a forward token — no customer_id. Lava attributes the request to the specified meter for cost tracking and analytics, without any customer context.
- SDK gateway()
- SDK generateForwardToken()
- Manual token
How It Works
- Lava validates your secret key and resolves the meter.
- The request is forwarded to the AI provider.
- Usage (tokens, cost) is recorded and attributed to the meter.
Disable Billing
Passcustomer_id, meter_slug, and disable_billing: true to route a request with full customer context without charging their subscription. The customer’s identity is preserved in usage records, but no credits are deducted from their plan.
- SDK gateway()
- SDK generateForwardToken()
- Manual token
How It Works
- Lava validates your secret key, resolves the customer and meter.
- The customer’s subscription balance is not checked or deducted.
- The request is forwarded to the AI provider.
- Usage is recorded and attributed to the customer.
Subscription entitlements are still enforced when billing is disabled. The meter must be on the customer’s active plan —
disable_billing only skips the charge, not authorization.Common Use Cases
- Free trials — let new customers use your service before they subscribe.
- Testing integrations — verify a customer’s setup end-to-end without deducting their credits.
- Promotional requests — absorb the cost of specific requests without affecting the customer’s plan.
- Debugging — reproduce a customer’s issue with their full auth context intact.
Comparing All Request Modes
For reference, here is how meter-only and disable billing fit alongside Lava’s other request modes:| Mode | Token params | Customer charged? | Customer tracked? |
|---|---|---|---|
| Gateway (simplest) | none | No | No |
| Meter-only | meter_slug | No | No |
| Customer billing | customer_id + meter_slug | Yes | Yes |
| Billing disabled | customer_id + meter_slug + disable_billing | No | Yes |
Next Steps
Node.js SDK
Full SDK reference including all forward token options
Meters
Configure pricing and metering for your API
Checkout
Set up customer checkout to start billing
Usage Analytics
Query and visualize usage data from metered requests