On Demand Subscriptions
On Demand Subscriptions allow you to charge customers flexibly, rather than strictly on a recurring schedule.
Using On-Demand Subscriptions
On-demand subscriptions allow you to charge customers flexibly, rather than strictly on a recurring schedule.
Enabling On-Demand Subscriptions
To enable on-demand subscriptions, contact Dodo Payments Support. Once enabled for your business, you’ll have access to create and manage on-demand subscriptions.
Creating an On-Demand Subscription
To create an on-demand subscription, use the POST /subscriptions API endpoint.
Include the on_demand
field in your request body to activate on-demand functionality:
Fields Description:
mandate_only
(boolean, required):- If set to
true
, no immediate charge is performed. Instead, this authorizes the payment method details for future charges.
- If set to
product_price
(integer, optional):- Sets the initial price for the product charged to the customer.
- If not provided, the system defaults to the stored product price.
Charging an On-Demand Subscription
For subsequent charges on an existing on-demand subscription, use the following endpoint. Try it out in the API Explorer:
Parameters
subscription_id
(string, path, required): Subscription ID.
Request Body
product_price
(integer, required): The amount you wish to charge the customer for this transaction.
Response
A successful charge will return HTTP status 200
with the following response body:
This flexibility allows you to manage charges according to your business requirements.