Subscription payments allow businesses to charge customers recurring monthly payments for course services instead of a one-time fee. For example, a yoga studio can offer a 6-month Pilates course where customers pay monthly rather than upfront.
You configure subscription pricing on a service using the Services V2 API, and track subscription status on bookings using the Bookings Reader V2 API.
rateType set to SUBSCRIPTION. They configure the price per billing cycle, total number of payments, and when billing starts.ENDED.The subscription billing schedule is controlled by two fields on the service's payment.subscription object:
firstChargeDate: Determines when the first payment is collected.
CHECKOUT: The first payment is charged immediately at checkout. Subsequent billing cycles start from recurringStartDate.SCHEDULED: The first payment is charged on recurringStartDate.recurringStartDate: The date when recurring billing begins. All future billing cycle dates are calculated from this date.
For example, if recurringStartDate is set to February 1st with MONTHLY frequency and totalPayments of 6, the customer is billed on the 1st of each month from February through July.
Customers who book after recurring billing starts are billed from the current cycle onward, for the remaining billing cycles only. For example, a customer who books the same course in April pays 4 monthly payments instead of 6, at the same price per cycle.
Once a customer books a course with subscription pricing, the subscription progresses through these statuses:
| Status | Description |
|---|---|
DRAFT | Subscription created but not yet paid for. Transitions to PENDING or ACTIVE after the first successful payment. |
PENDING | Subscription is paid but the start date is in the future. |
ACTIVE | Subscription is active and billing. |
PAUSED | Subscription is temporarily paused. |
CANCELED | Subscription was canceled before completing all billing cycles. |
ENDED | Subscription completed all billing cycles. |
To track a booking's subscription status, call Query Extended Bookings with withEcomOrder set to true. The response includes a subscriptionInfo object with:
currentCycle: Number of billing cycles successfully charged so far.totalCycles: Total number of billing cycles in the subscription.status: Current subscription status.subscriptionId: ID of the underlying billing subscription.cyclePrice: The amount charged for the most recent billing cycle, including tax and discounts.If a subscription payment fails, the booking's paymentStatus changes to FAILED. If the payment is later recovered, paymentStatus changes back to PAID. If it isn't recovered, the subscription is eventually canceled.
It's important to note the following points before starting to code:
MONTHLY only.