Docs
Billing (Console)
Top up credits and review your balance history.
Where to manage billing
Billing is available in the Console at Billing. The page shows balance history and your top-ups.
Crypto top-ups with Morlane
0-0 can top up credits with a single crypto payment button. The backend creates a Morlane buyer-selected checkout session, and the Billing page opens Morlane's embedded checkout URL inside a modal iframe instead of redirecting the user away from the console.
- Configure `MORLANE_API_BASE_URL`, `MORLANE_API_KEY`, `MORLANE_STORE_ID`, `MORLANE_PRODUCT_ID`, `MORLANE_ASSET=USDC`, and `MORLANE_NETWORK=Polygon` in the backend environment. The asset and network values are only the recommended default.
- Create a product-scoped Morlane webhook pointing to `<APP_PUBLIC_URL>/api/webhook/morlane` with `payment.paid` and `payment.overpaid` events.
- The Morlane modal lets the buyer choose the enabled stablecoin asset and network, then generates the matching QR code.
- The frontend listens for `morlane.checkout.paid` from `/pay/{checkoutId}?embed=1`, then polls `/api/billing/topup/status` until the local balance is updated.
- The webhook handler fetches the Morlane payment again and validates store, product, asset, network, amount, and request ID before crediting the user.