Limited Release
A subscription is a customer’s enrollment in a pricing plan with specific billing configuration.
Subscriptions connect the following:
- Customers who receive service and are billed for usage.
- Pricing plans that define metrics, pricing models, and features.
- Billing configuration that determines when billing starts and which payment method to use.
Prerequisites
- Create and set up all pricing plans that you offer to customers.
- Register customers who use Usage-based Billing plans.
1. Understand subscription configuration
Before you create a subscription, collect these configuration details from your customer and system. Then, you can make a POST call to the Create subscription endpoint to send the information to PayPal. Customer information External customer ID: Set this to the unique identifier (external_id) returned when you created the customer. This value links the subscription to a specific customer.
Plan details
- Plan code: Set this to the code for the pricing plan your customer selected.
-
Plan overrides: You can negotiate special contracts with customers. These contracts can include custom discounts and price adjustments that differ from your standard plan. When you create the subscription, you can override the base plan with these negotiated terms.
You can override these plan elements:
- Subscription invoice display name
- Subscription fee
- Plan trial period
- Plan taxes
- Charge properties (except the charge model)
- Charge minimum spending
- Charge taxes
- Charge invoice display name
- Minimum commitment amount and display name
- Billing time: Choose when billing cycles start. You can start them on a calendar date (like the 1st of each month) or on the same date the subscription begins each month.
- Start date: Send the date when your customer’s subscription starts.
- End date: Optionally specify when the subscription should end if it has a defined term.
2. Create subscription
Use a valid access token and make a POST call to the/v1/commerce/billing/subscriptions endpoint. Include the following parameters:
For information on all parameters, see API reference.
201 Created response. The response includes the following parameter:
For information on all parameters, see API reference.
3. Understand subscription lifecycle and manage subscriptions
Subscriptions progress through distinct states throughout their lifecycle. These states determine billing behavior and available management actions. To monitor a subscription’s current state, make a GET call to the /v1/commerce/billing/subscriptions/ endpoint and review thestatus parameter. The subscription’s lifecycle state determines the management actions you can perform to ensure proper subscription handling.