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. This can be implemented in Metronome using payment-gated commits. When a payment-gated commit is created, Metronome facilitates the following:
Metronome immediately triggers a payment attempt based on the invoice amount of the commit.
If the payment succeeds, Metronome releases the commit and the customer is granted access to the associated balance.
If the payment fails, Metronome voids the resource and sends a webhook notification.
If further action is required (e.g. for 2F authentication), Metronome sends a webhook notification.
Add a payment-gated commit to an existing contract
Payment gated commits can only be added to existing contracts. You can create a payment-gated commit by editing the user’s contract. Make sure the contract has a valid billing configuration. See below for an example API call:
If payment fails, the associated invoice in Metronome and Stripe is voided and no commit is created. To retry the payment, send a new API request with the relevant commit information.
NO AUTOMATIC RETRIESMetronome does not automatically retry failed payments (as any automatic
retries would likely fail, too).