# Subscription

The object below is returned directly or within a successful response from the following API requests:

* [Retrieve a subscription](/json-rpc-api-reference/json-rpc-api-6.0/api-requests/subscription/retrieve-a-subscription.md)
* [Search subscriptions](/json-rpc-api-reference/json-rpc-api-6.0/api-requests/subscription/search-subscriptions.md)
* [Retrieve a customer’s subscriptions](/json-rpc-api-reference/json-rpc-api-6.0/api-requests/subscription/retrieve-a-customers-subscriptions.md)
* [Retrieve specific list of subscriptions](/json-rpc-api-reference/json-rpc-api-6.0/api-requests/subscription/retrieve-specific-list-of-subscriptions.md)

## Subscription object

<table><thead><tr><th width="385.7332763671875">Parameter</th><th>Type / Description</th></tr></thead><tbody><tr><td><code>SubscriptionReference</code></td><td><strong>String</strong><br>Unique, system-generated subscription identifier.</td></tr><tr><td><code>StartDate</code></td><td><p><strong>String</strong><br>Subscription start date(YYYY-MM-DD) - represents the date since the subscription became active. It might be greater or at least equal to the subscription start(creation/purchase) date. While not reached, the subscription has a pending activation status.</p><p>StartDate is mandatory when importing subscription data. If you changed the time zone for the Avangate API by editing system settings under Account settings, then the StartDate you provide must be in accordance with your custom configuration.</p></td></tr><tr><td><code>ActivationDate</code></td><td><strong>String</strong><br>Subscription activation date (YYYY-MM-DD) ActivationDate is optional when updating subscription data. If you changed the time zone for the Avangate API by editing system settings under Account settings, then the ActivationDate you provide must be in accordance with your custom configuration.</td></tr><tr><td><code>ExpirationDate</code></td><td><strong>String</strong><br>Subscription expiration date(YYYY-MM-DD) - ExpirationDate is mandatory when importing subscription data. If you changed the time zone for the Avangate API by editing system settings under Account settings, then the ExpirationDate you provide must be in accordance with your custom configuration.</td></tr><tr><td><code>RecurringEnabled</code></td><td><p><strong>Boolean</strong><br>Possible values:</p><p>TRUE – recurring billing/automatic subscription renewals <strong>enabled</strong></p><p>FALSE– recurring billing/automatic subscription renewals <strong>disabled</strong></p></td></tr><tr><td><code>NextBillingDate</code></td><td><strong>Date</strong><br>The date when the client will be billed next (ISO 8601).</td></tr><tr><td><code>SubscriptionEnabled</code></td><td><p><strong>Boolean</strong></p><p>Possible values:</p><p>TRUE –subscription <strong>enabled</strong></p><p>FALSE–subscription <strong>disabled</strong></p></td></tr><tr><td><code>ReasonText</code></td><td><strong>Boolean</strong><br>Displays campaign details and confirm discount acceptance status for churn-prevention flows.</td></tr><tr><td><code>Product</code></td><td><strong>Required (object)</strong><br>The product for which Avangate generated the subscription. Details below.</td></tr><tr><td><code>Product.ProductCode</code></td><td><strong>String</strong><br>Unique product identifier that you control.</td></tr><tr><td><code>Product.ProductId</code></td><td><strong>Int</strong><br>Unique, system-generated product identifier.</td></tr><tr><td><code>Product.ProductName</code></td><td><strong>String</strong><br>Product name.</td></tr><tr><td><code>Product.ProductQuantity</code></td><td><strong>Int</strong><br>Ordered number of units.</td></tr><tr><td><code>Product.ProductVersion</code></td><td><strong>String</strong><br>Product version.</td></tr><tr><td><code>Product.PriceOptioCodes</code></td><td><strong>Array</strong><br>The product options codes the customer selected when acquiring the subscription. Pricing options codes are case sensitive.</td></tr><tr><td><code>EndUser</code></td><td><strong>Object</strong><br>The end user of the subscription. Details below.</td></tr><tr><td><code>EndUser.Person</code></td><td><strong>Object</strong></td></tr><tr><td><code>EndUser.Person.FirstName</code></td><td><strong>String</strong><br>End user's first name</td></tr><tr><td><code>EndUser.Person.LastName</code></td><td><strong>String</strong><br>End user's last name</td></tr><tr><td><code>EndUser.Person.CountryCode</code></td><td><strong>String</strong><br>End user country code [ISO3166-1 Alpha 2].</td></tr><tr><td><code>EndUser.Person.State</code></td><td><strong>String</strong><br>End user state.</td></tr><tr><td><code>EndUser.Person.City</code></td><td><strong>String</strong><br>End user city.</td></tr><tr><td><code>EndUser.Person.Address1</code></td><td><strong>String</strong><br>End user first address line.</td></tr><tr><td><code>EndUser.Person.Address2</code></td><td><strong>String</strong><br>End user second address line.</td></tr><tr><td><code>EndUser.Person.Zip</code></td><td><strong>String</strong><br>End user zip code.</td></tr><tr><td><code>EndUser.Person.Email</code></td><td><strong>String</strong><br>End user email address.</td></tr><tr><td><code>EndUser.Person.Phone</code></td><td><strong>String</strong><br>End user phone number.</td></tr><tr><td><code>EndUser.Person.Company</code></td><td><strong>String</strong><br>Company name.</td></tr><tr><td><code>EndUser.Person.Fax</code></td><td><strong>String</strong><br>End user fax.</td></tr><tr><td><code>EndUser.Person.Language</code></td><td><strong>String</strong><br>Language [ISO639-2] the Avangate system uses for communications.</td></tr><tr><td><code>SKU</code></td><td><strong>String</strong><br>Stock keeping unit you defined.</td></tr><tr><td><code>DeliveryInfo</code></td><td><strong>Object</strong><br>The object contains information about the delivery/fulfillment made to the customer.</td></tr><tr><td><code>DeliveryInfo.Description</code></td><td><strong>String</strong><br>Delivery description.</td></tr><tr><td><code>DeliveryInfo.Codes</code></td><td><strong>Array of objects</strong></td></tr><tr><td><code>DeliveryInfo.Codes.Code</code></td><td><strong>String</strong><br>Activation key/license code of the first order from this subscription. Use <strong>getSubscriptionHistory</strong> method if you want to retrieve the activation keys/license codes for all orders belonging to a subscription.</td></tr><tr><td><code>DeliveryInfo.Codes.Description</code></td><td><strong>String</strong><br>Code description for dynamic lists from your key generator. </td></tr><tr><td><code>DeliveryInfo.Codes.ExtraInfo</code></td><td><strong>Object</strong><br>Info set by your key generator for dynamic lists only.</td></tr><tr><td><code>DeliveryInfo.Codes.ExtraInfo.CodeExtraInfo</code></td><td><strong>Object</strong></td></tr><tr><td><code>DeliveryInfo.Codes.ExtraInfo.Type</code></td><td><strong>String</strong></td></tr><tr><td><code>DeliveryInfo.Codes.ExtraInfo.Label</code></td><td><strong>String</strong></td></tr><tr><td><code>DeliveryInfo.Codes.ExtraInfo.Value</code></td><td><strong>String</strong></td></tr><tr><td><code>DeliveryInfo.Codes.File</code></td><td><strong>Array of objects</strong></td></tr><tr><td><code>DeliveryInfo.Codes.File.Content</code></td><td><strong>String</strong><br>Content of the file (base64 encoded).</td></tr><tr><td><code>DeliveryInfo.Codes.File.ContentLength</code></td><td><strong>Int</strong><br>File size.</td></tr><tr><td><code>DeliveryInfo.Codes.File.Filename</code></td><td><strong>String</strong><br>The name of the delivered file.</td></tr><tr><td><code>DeliveryInfo.Codes.File.FileType</code></td><td><strong>String</strong><br>The type of the delivered file.</td></tr><tr><td><code>ReceiveNotifications</code></td><td><p><strong>Boolean</strong><br>1 – Subscribe: Avangate sends subscription notifications to the end user.</p><p>0 – Unsubscribe – Avangate does not send subscription notifications to the end user.</p></td></tr><tr><td><code>Lifetime</code></td><td><p><strong>Boolean</strong><br>Possible values:</p><ul><li>True – the subscription is evergreen</li></ul><p>False – the subscription has a recurring billing cycle less than or equal to three years.</p></td></tr><tr><td><code>PartnerCode</code></td><td><p><strong>String</strong></p><ul><li>Empty: for ecommerce orders</li><li>Partner Code</li></ul></td></tr><tr><td><code>AvangateCustomerReference</code></td><td><strong>Int</strong><br>Unique, system-generated customer identifier.</td></tr><tr><td><code>ExternalCustomerReference</code></td><td><strong>String</strong><br>Customer identifier that you control.</td></tr><tr><td><code>TestSubscription</code></td><td><strong>Boolean</strong><br>True for test subscriptions, false otherwise.</td></tr><tr><td><code>IsTrial</code></td><td><strong>Boolean</strong><br>True for trial subscriptions, false otherwise.</td></tr><tr><td><code>MerchantCode</code></td><td><strong>String</strong><br>Unique, system-generated ID in the Avangate system.</td></tr><tr><td><code>ScheduledActions</code></td><td><strong>Array of objects</strong><br>Information regarding any updates made to the subscription, scheduled to happen at the end of the billing cycle.</td></tr><tr><td><code>ScheduledActions.ProductUpdate</code></td><td><strong>Object</strong></td></tr><tr><td><code>ScheduledActions.ProductUpdate.ProductCode</code></td><td><strong>String</strong><br>Unique product identifier that you control to which the subscription will be updated.</td></tr><tr><td><code>ScheduledActions.ProductUpdate.ProductID</code></td><td><strong>Int</strong><br>Unique, system-generated product identifier to which the subscription will be updated.</td></tr><tr><td><code>ScheduledActions.ProductUpdate.ProductName</code></td><td><strong>String</strong><br>Product name to which the subscription will be updated to.</td></tr><tr><td><code>ScheduledActions.ProductUpdate.PriceOptionCodes</code></td><td><strong>Array</strong><br>The product options codes to which the subscription will be updated. Pricing options codes are case sensitive.</td></tr><tr><td><code>ScheduledActions.ProductUpdate.ProductQuantity</code></td><td><strong>Int</strong><br>Number of units to which the subscription will be updated.</td></tr><tr><td><code>ScheduledActions.ProductUpdate.ScheduledOn</code></td><td><strong>Date</strong><br>The date when the update is scheduled to happen.</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.2checkout.com/json-rpc-api-reference/json-rpc-api-6.0/api-responses/subscription.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
