threshold_amount
prepaid_balance_threshold_configuration
. This config dictates:
threshold_amount
for the customer’s contract: the balance level when a customer is recharged.recharge_to_amount
: the balance the customer is topped up to after a recharge initiates.payment_gate_config
: configure whether to gate the release of balance on payment and what gateway to use.
EXTERNAL
if you use a gateway that Metronome doesn’t currently support.PAYMENT_TYPE
to dictate whether payment is sent as an invoice through Stripe Billing or directly as a paymentIntent
to Stripe’s payment gateway.is_enabled
. If a payment fails and payment gating is enabled, this shifts to false
.is_enabled
to true
if you want Metronome to immediately evaluate the contract after its creation.prepaid_balance_threshold_configuration
by editing the contract. For example, you can update the threshold_amount
on a contract.
Note that these changes take effect immediately and Metronome forces an evaluation of the customer’s current balance on each config change.
Edit contracts in the Metronome app or with the Metronome API. This API call adds a prepaid balance threshold to a contract:
threshold_amount
has been reached. If the payment_gate_config
is set to Stripe, Metronome attempts to charge the customer in Stripe.
If payment is successful, Metronome creates a commit for the amount that recharges the customer back to the recharge_to_amount
.
payment_gate.threshold_reached
when the customer hits their threshold.payment_gate.payment_status
after payment has been attempted. The status of that payment, paid
or failed
, is denoted in the payment_status
field.payment_gate.payment_pending_action_required
if intervention is required to process payment.payment_gate.payment_status
with the value of failed
. Additionally, the contract’s is_enabled
field is set to false
.
You should expect to see a voided invoice in Metronome and Stripe for this transaction.
At this point, you should follow up with your customer directly or by creating an automated workflow triggered by this webhook notification.
Once you’re ready to reattempt payment, set the contract’s is_enabled
field to true
. This forces the contract to evaluate against the threshold_amount
, resulting in a new payment attempt.
EXTERNAL
option for payment_gate_type
, you are responsible for facilitating payment and letting Metronome know the response. Follow this workflow:
payment_gate_type
set to EXTERNAL
.payment_gate.external_initiate
that indicates Metronome is ready to receive the outcome of the payment.workflow_id
- you need this to release the commit.