Organizations commonly implement a prepaid model for their PLG customers. Customers must pay for usage in advance of using the product and organizations gate access pending successful payment. To implement an on-session usage credit purchase flow in your product, use Stripe Checkout:
Checkout provides you with UI components you can embed in your product. You can configure this UI to display prebuilt credit purchase options and a custom credit purchase amount.
Your customers can provide a payment method or leverage an existing saved payment method to confirm purchase amount.
Checkout attempts payment in Stripe based on selected amount. If payment is successful, Checkout creates the corresponding commit in Metronome on the specified contract. If payment fails, no commit in Metronome is created.
Private previewProvisioning usage credits via Stripe Checkout is in private preview. Request access to the private preview in the linked docs above.
Use the Metronome API
If you choose not to use Checkout or you already create payment-gated commits with the Metronome API, you can facilitate this flow over the Metronome API. See Create payment-gated commits with the Metronome API.
Configure automatic top-ups
Commonly, users want to enable their customers to automatically top up their credit balance when they hit a certain threshold without requiring the customer to come on-session to purchase more credits. To enable automatic top-ups, follow instructions for prepaid balance threshold billing.
Assistant
Responses are generated using AI and may contain mistakes.