Prerequisites: Complete the Track Usage Quickstart first.
Create a Plan
Go to Monetize > Plans and click New Plan. Configure:
- Name: e.g. “Pro Plan” (customers see this)
- Monthly Amount: e.g.
$25.00 - Rollover: Whether unused balance carries over
sub_xxxxx) — you’ll need it for checkout.Embed Checkout (Frontend)
Use the
useLavaCheckout hook to open the checkout modal. It handles phone verification, payment setup, and subscription creation in one flow.Generate Forward Tokens
After checkout, retrieve the connection and generate forward tokens for the customer:Use this token in API requests exactly like the Create Your First Request flow — but now balance checks and usage billing will apply to your customer as well.
Check the Dashboard
Go to Monetize > Customers to see your customer’s connection, balance, and usage. Go to Analytics > Requests to see individual requests with cost breakdowns.
What’s Next?
Meters
Configure usage-based pricing rules for your meters
Checkout Guide
Advanced checkout: topup mode, credit bundles, and completion handling
Webhooks
Receive notifications for connection and balance events
Forward Proxy
Token generation, multi-provider routing, and error handling
Troubleshooting
Checkout component not displaying
Checkout component not displaying
Verify
@lavapayments/checkout is installed, the session token hasn’t expired (60-minute limit), and the component is in a client component ('use client').401 on forward token
401 on forward token
Decode the token to inspect contents:
echo "token" | base64 -d. Verify the secret key, connection ID, and meter slug are all valid and active in the dashboard.