Manage recurring payments in orders
Use these API methods to manage the scheduled payments (billing events) of instalment, subscription, and metered orders.
- Instalment orders have multiple billing events, and BillPro creates them all when you create the order.
- Subscription orders usually have one or two billing events, because BillPro creates one billing event for each billing cycle.
- Metered orders can have any number of billing events because after you create a metered order, you can schedule payments in the UI, and BillPro creates a billing event for each scheduled payment. See Charge for metered products.
In the API, you can update scheduled payments as follows:
- Reschedule and skip billing events, and update the amount.
- For subscriptions:
- Adjust the billing cycle of the billing events. To do this, set the
scheduled_interval
of the last scheduled payment to an integer value, and set thescheduled_duration_unit
toDAY
,WEEK
,MONTH
, orYEAR
. Note that BillPro does not display these changes in the order. - When you adjust the
amount
of a scheduled payment, BillPro will update the orderamount
for the future billing events.
- Adjust the billing cycle of the billing events. To do this, set the
For full details, see Update scheduled payment.
For steps to Create a subscription with a trial, see Recipes.
For details of how to manage billing events in the UI, see Manage billing events.
When you pause an order, BillPro will not collect any payments and the scheduled payments are in the paused
state. Using the API, it is possible to update the scheduled payments to a scheduled
state, but in any case, BillPro will not collect any payments until the order is resumed into an active
or failed
state.