Subscription
June 5, 2026 ยท View on GitHub
The subscription details.
Structure
Subscription
Fields
| Name | Type | Tags | Description | Getter | Setter |
|---|---|---|---|---|---|
Id | String | Optional, Read-only | The PayPal-generated ID for the subscription. Constraints: Minimum Length: 3, Maximum Length: 50 | String getId() | setId(String id) |
PlanId | String | Optional | The ID of the plan. Constraints: Minimum Length: 3, Maximum Length: 50 | String getPlanId() | setPlanId(String planId) |
StartTime | String | Optional | The date and time, in Internet date and time format. Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates. Constraints: Minimum Length: 20, Maximum Length: 64, Pattern: ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$ | String getStartTime() | setStartTime(String startTime) |
Quantity | String | Optional | The quantity of the product in the subscription. Constraints: Minimum Length: 1, Maximum Length: 32, Pattern: ^([0-9]+|([0-9]+)?[.][0-9]+)$ | String getQuantity() | setQuantity(String quantity) |
ShippingAmount | Money | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | Money getShippingAmount() | setShippingAmount(Money shippingAmount) |
Subscriber | Subscriber | Optional | The subscriber response information. | Subscriber getSubscriber() | setSubscriber(Subscriber subscriber) |
BillingInfo | SubscriptionBillingInformation | Optional | The billing details for the subscription. If the subscription was or is active, these fields are populated. | SubscriptionBillingInformation getBillingInfo() | setBillingInfo(SubscriptionBillingInformation billingInfo) |
CreateTime | String | Optional | The date and time, in Internet date and time format. Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates. Constraints: Minimum Length: 20, Maximum Length: 64, Pattern: ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$ | String getCreateTime() | setCreateTime(String createTime) |
UpdateTime | String | Optional | The date and time, in Internet date and time format. Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates. Constraints: Minimum Length: 20, Maximum Length: 64, Pattern: ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$ | String getUpdateTime() | setUpdateTime(String updateTime) |
CustomId | String | Optional | The custom id for the subscription. Can be invoice id. Constraints: Minimum Length: 1, Maximum Length: 127, Pattern: ^[\x20-\x7E]+ | String getCustomId() | setCustomId(String customId) |
PlanOverridden | Boolean | Optional, Read-only | Indicates whether the subscription has overridden any plan attributes. | Boolean getPlanOverridden() | setPlanOverridden(Boolean planOverridden) |
Plan | PlanDetails | Optional | The plan details. | PlanDetails getPlan() | setPlan(PlanDetails plan) |
Links | List<LinkDescription> | Optional, Read-only | An array of request-related HATEOAS links. | List | setLinks(List |
Example (as JSON)
{
"id": "id4",
"plan_id": "plan_id6",
"start_time": "start_time8",
"quantity": "quantity0",
"shipping_amount": {
"currency_code": "currency_code0",
"value": "value6"
}
}