- 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.
 
IMMEDIATELYMetronome initiates payment with your configured billing provider and monitors for completion. In most success cases, payment is completed and credits are released within seconds, but actual timing depends on the payment provider, payment method, and potential authentication challenges.
Before you begin
- Ensure the customer has a default payment method configured in your payment provider (e.g., Stripe); otherwise, payments will fail and commits will not be created.
 - Capture and store customer address during your checkout flow. If address is invalid or missing, subsequent payments for the customer will fail.
 
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:Manage notifications
Two types of webhook notifications are emitted when creating a payment-gated commit:payment_gate.payment_statusafter payment has been attempted. The status of that payment,paidorfailed, is denoted in thepayment_statusfield.payment_gate.payment_pending_action_requiredif intervention is required to process payment.
Handle failed payments
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).