For the complete documentation index, see llms.txt. This page is also available as Markdown.

Subscription

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

Subscription object

Parameter
Type / Description

SubscriptionReference

String Unique, system-generated subscription identifier.

StartDate

String 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.

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.

ActivationDate

String 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.

ExpirationDate

String 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.

RecurringEnabled

Boolean Possible values:

TRUE – recurring billing/automatic subscription renewals enabled

FALSE– recurring billing/automatic subscription renewals disabled

NextBillingDate

Date The date when the client will be billed next (ISO 8601).

SubscriptionEnabled

Boolean

Possible values:

TRUE –subscription enabled

FALSE–subscription disabled

ReasonText

Boolean Displays campaign details and confirm discount acceptance status for churn-prevention flows.

Product

Required (object) The product for which Avangate generated the subscription. Details below.

Product.ProductCode

String Unique product identifier that you control.

Product.ProductId

Int Unique, system-generated product identifier.

Product.ProductName

String Product name.

Product.ProductQuantity

Int Ordered number of units.

Product.ProductVersion

String Product version.

Product.PriceOptioCodes

Array The product options codes the customer selected when acquiring the subscription. Pricing options codes are case sensitive.

EndUser

Object The end user of the subscription. Details below.

EndUser.Person

Object

EndUser.Person.FirstName

String End user's first name

EndUser.Person.LastName

String End user's last name

EndUser.Person.CountryCode

String End user country code [ISO3166-1 Alpha 2].

EndUser.Person.State

String End user state.

EndUser.Person.City

String End user city.

EndUser.Person.Address1

String End user first address line.

EndUser.Person.Address2

String End user second address line.

EndUser.Person.Zip

String End user zip code.

EndUser.Person.Email

String End user email address.

EndUser.Person.Phone

String End user phone number.

EndUser.Person.Company

String Company name.

EndUser.Person.Fax

String End user fax.

EndUser.Person.Language

String Language [ISO639-2] the Avangate system uses for communications.

SKU

String Stock keeping unit you defined.

DeliveryInfo

Object The object contains information about the delivery/fulfillment made to the customer.

DeliveryInfo.Description

String Delivery description.

DeliveryInfo.Codes

Array of objects

DeliveryInfo.Codes.Code

String Activation key/license code of the first order from this subscription. Use getSubscriptionHistory method if you want to retrieve the activation keys/license codes for all orders belonging to a subscription.

DeliveryInfo.Codes.Description

String Code description for dynamic lists from your key generator.

DeliveryInfo.Codes.ExtraInfo

Object Info set by your key generator for dynamic lists only.

DeliveryInfo.Codes.ExtraInfo.CodeExtraInfo

Object

DeliveryInfo.Codes.ExtraInfo.Type

String

DeliveryInfo.Codes.ExtraInfo.Label

String

DeliveryInfo.Codes.ExtraInfo.Value

String

DeliveryInfo.Codes.File

Array of objects

DeliveryInfo.Codes.File.Content

String Content of the file (base64 encoded).

DeliveryInfo.Codes.File.ContentLength

Int File size.

DeliveryInfo.Codes.File.Filename

String The name of the delivered file.

DeliveryInfo.Codes.File.FileType

String The type of the delivered file.

ReceiveNotifications

Boolean 1 – Subscribe: Avangate sends subscription notifications to the end user.

0 – Unsubscribe – Avangate does not send subscription notifications to the end user.

Lifetime

Boolean Possible values:

  • True – the subscription is evergreen

False – the subscription has a recurring billing cycle less than or equal to three years.

PartnerCode

String

  • Empty: for ecommerce orders

  • Partner Code

AvangateCustomerReference

Int Unique, system-generated customer identifier.

ExternalCustomerReference

String Customer identifier that you control.

TestSubscription

Boolean True for test subscriptions, false otherwise.

IsTrial

Boolean True for trial subscriptions, false otherwise.

MerchantCode

String Unique, system-generated ID in the Avangate system.

ScheduledActions

Array of objects Information regarding any updates made to the subscription, scheduled to happen at the end of the billing cycle.

ScheduledActions.ProductUpdate

Object

ScheduledActions.ProductUpdate.ProductCode

String Unique product identifier that you control to which the subscription will be updated.

ScheduledActions.ProductUpdate.ProductID

Int Unique, system-generated product identifier to which the subscription will be updated.

ScheduledActions.ProductUpdate.ProductName

String Product name to which the subscription will be updated to.

ScheduledActions.ProductUpdate.PriceOptionCodes

Array The product options codes to which the subscription will be updated. Pricing options codes are case sensitive.

ScheduledActions.ProductUpdate.ProductQuantity

Int Number of units to which the subscription will be updated.

ScheduledActions.ProductUpdate.ScheduledOn

Date The date when the update is scheduled to happen.

ActivationKey

String The activation code delivered to te customer.

Last updated

Was this helpful?