Billing cycles
Last updated: Sept 24th, 4:26pm
When you create a plan, you set the regular period billing cycle duration. A plan’s billing cycle defines the recurring frequency with which the subscriber is charged. For example, a plan with a weekly billing cycle charges the subscriber on a recurring frequency of one week.
You can choose from the following billing cycles:
- Day
- Week
- Month
- Year
- Custom: customize the billing cycle for more flexible options like two weeks or three months.
Finite and infinite
Billing cycles can continue for a specified period of time, a finite plan, or until the user cancels the subscription, an infinite plan.
-
Finite plan - A plan with a fixed number of billing cycles. Create a finite plan if you want to associate a pre-defined number of cycles to the plan. Once a buyer subscribes to a finite plan, the subscription remains active for the specified number of billing cycles. You create a finite plan by specifying the
total_cycles
of billing cycles when you create the plan.Example: An online tutorial course priced at $10 per month and scheduled to last for five monthly cycles. The subscriber is charged $10 for five monthly cycles with the subscription ending after the fifth cycle.
-
Infinite plan - A plan without a fixed number of cycles. Create an infinite plan if you don’t want to associate a pre-defined number of cycles to the plan. Once a buyer subscribes to an infinite plan, the subscription remains active until cancelation. You create an infinite plan by specifying the
total_cycles
of billing cycles as 0 when you create the plan.Example: A plan for video streaming service priced at $20 per month. The subscriber is charged $20 per month until they cancel the subscription.
Example: finite plan
This example sets a finite plan with the following characteristics:
- Five cycles
- Each billing cycle is one month
1curl -v –X POST https://api-m.sandbox.paypal.com/v1/billing/plans /2-H "Content-Type: application/json" /3-H "Authorization: Bearer ACCESS-TOKEN" /4-d '{5 "name": "Beginner Plan",6 "description": "Five month beginner course",7 "product_id": "PROD-5RN21878H3527870P",8 "billing_cycles": [9 {10 "frequency": {11 "interval_unit": "MONTH",12 "interval_count": 113 },14 "tenure_type": "REGULAR",15 "sequence": 1,16 "total_cycles": 5,17 "pricing_scheme": {18 "fixed_price": {19 "value": "10",20 "currency_code": "USD"21 }22 }23 }24 ],25 "payment_preferences": {26 "auto_bill_outstanding": true,27 "payment_failure_threshold": 128 }29 }'
Example: infinite plan
This example sets an infinite plan with the following characteristics:
- Billing continues until the subscriber cancels. Create an infinite plan by specifying the
total_cycles
of billing cycles as 0. - Each billing cycle is one month
1curl -v –X POST https://api-m.sandbox.paypal.com/v1/billing/plans /2-H "Content-Type: application/json" /3-H "Authorization: Bearer ACCESS-TOKEN" /4-d '{5 "name": "Premium Video Plus",6 "description": "Premium plan with video download feature",7 "product_id": "PROD-5RN21878H3527870P",8 "billing_cycles": [9 {10 "frequency": {11 "interval_unit": "MONTH",12 "interval_count": 113 },14 "tenure_type": "REGULAR",15 "sequence": 1,16 "total_cycles": 0,17 "pricing_scheme": {18 "fixed_price": {19 "value": "20",20 "currency_code": "USD"21 }22 }23 }24 ],25 "payment_preferences": {26 "auto_bill_outstanding": true,27 "payment_failure_threshold": 128 }29 }'
See also
- Create a plan - You set the billing cycle frequency and the length of the subscription when you create the plan.