Integrate on-demand subscriptions by authorizing mandates, creating variable charges, handling webhooks, and implementing safe retry policies.
payment_link: true
and provide a return_url
.on_demand
object to authorize a payment method and optionally collect an initial charge.payment.succeeded
, payment.failed
) to update your system.Request Body Parameters
100
.product_price
. If false, fees are added on top. Ignored when adaptive pricing is disabled.payment_link: true
, redirect the customer to payment_link
to complete mandate authorization.Charge request body parameters
2500
.product_price
. If false, fees are added on top.on_demand: true
in its details before charging.DO_NOT_HONOR
, STOLEN_CARD
, LOST_CARD
, PICKUP_CARD
, FRAUDULENT
, AUTHENTICATION_FAILURE
.retry_attempt
).STOLEN_CARD
DO_NOT_HONOR
FRAUDULENT
PICKUP_CARD
AUTHENTICATION_FAILURE
LOST_CARD
insufficient_funds
, issuer_unavailable
, processing_error
, network timeouts). If the same decline repeats, pause further retries.payment.succeeded
and payment.failed
to reconcile usage-based charges.Create in test mode
payment_link: true
, then open the link and complete the mandate.Trigger a charge
product_price
(e.g., 100
) and verify you receive payment.succeeded
.Go live
on_demand.mandate_only
is provided on creation and product_price
is provided for charges.product_currency
, confirm it’s supported for your account and customer.