Search subscriptions
Extract information on your account’s subscriptions. Use the searchSubscriptions method to retrieve details about your account’s subscriptions, based on a set of filters.
Subscriptions can be retrieved starting with 5 minutes after their orders are generated in the 2Checkout system.
Request parameters
sessionID
Required (string)
Session identifier, the output of the Login method. Include sessionID into all your requests. 2Checkout throws an exception if the values are incorrect. The sessionID expires in 10 minutes.
searchBy
Optional (object) Contains any combination of the available additional search filters.
Additional search filters
CustomerEmail
Optional (string) Customer email address. Can be NULL.
The CustomerEmail parameter must be paired always with another reference pointing to the correct customer, such as the 2CheckoutCustomerReference parameter or the ExternalCustomerReference parameter. Otherwise, the search call will return partial hits on the customer email address.
ExactMatchEmail
Optional (boolean) Force search by email to perform exact match; recommended to keep this option set to true in order to avoid matching similar email addresses from multiple customers.
DeliveredCode
Optional (string) Activation key/code. Can be NULL.
AvangateCustomerReference
Optional (int) System-generated customer reference. Can be NULL.
ExternalCustomerReference
Optional (string) External customer reference that you control. Can be NULL.
Aggregate
Optional (boolean) true - search will work across all your aggregated 2Checkout accounts. false - default value. You limit the search to the account whose details you used for authentication. Can be NULL.
SubscriptionEnabled
Optional (boolean) true for enabled subscriptions. false for disabled subscriptions. Can be NULL.
RecurringEnabled
Optional (StringArray) true – 2Checkout charges customers using recurring billing for subscriptions. false – customers need to make manual payments to renew their subscriptions. Can be NULL.
ProductCodes
Optional (StringArray) Product identifier that you control. Can be NULL.
CountryCodes
Optional (string) Country code (ISO 3166 two-letter code). Can be NULL.
PartnerCode
Optional (string) Can be NULL.
PurchasedAfter
Optional (string)
YYYY-MM-DD. Subscription search interval start. You can search for subscriptions purchased between the dates you set using PurchasedAfter and PurchasedBefore.
The default 2Checkout API time zone is GMT+02:00. Can be NULL.
PurchasedBefore
Optional (string) YYYY-MM-DD. Subscription search interval end. You can search for subscriptions purchased between the dates you set using PurchasedAfter and PurchasedBefore. Note: The default 2Checkout API time zone is GMT+02:00. Can be NULL.
ExpireAfter
Optional (string) YYYY-MM-DD. Search subscriptions set to expire after a specific date.
The default 2Checkout API time zone is GMT+02:00. Can be NULL.
ExpireBefore
Optional (string) YYYY-MM-DD. Search subscriptions set to expire before a specific date.
The default 2Checkout API time zone is GMT+02:00. Can be NULL.
ModifiedAfter
Optional (string) YYYY-MM-DD. Search subscriptions modified after a specific date.
ModifiedBefore
Optional (string) YYYY-MM-DD. Search subscriptions modified before a specific date.
RenewedAfter
Optional (string) YYYY-MM-DD. Search subscriptions renewed after a specific date.
The default 2Checkout API time zone is GMT+02:00. Can be NULL.
RenewedBefore
Optional (string) YYYY-MM-DD. Search subscriptions renewed before a specific date.
The default 2Checkout API time zone is GMT+02:00. Can be NULL.
NotificationAfter
Optional (string) YYYY-MM-DD. Search subscriptions for which the 2Checkout system sent out notifications after a specific date.
The default 2Checkout API time zone is GMT+02:00. Can be NULL.
NotificationBefore
Optional (string) YYYY-MM-DD. Search subscriptions for which the 2Checkout system sent out notifications before a specific date
The default 2Checkout API time zone is GMT+02:00. Can be NULL.
NextBillingDateAfter
Optional (string) YYYY-MM-DD. Search subscriptions with the next billing date after the specified date
NextBillingDateBefore
Optional (string) YYYY-MM-DD. Search subscriptions with the next billing date before the specified date
Type
Optional (string) trial - trial subscriptions. regular - all generated subscriptions that are not trials. regularfromtrial - subscriptions generated from a trial conversion. Can be NULL.
TestSubscription
Optional (boolean) true false, depending on whether you want to include test subscriptions in the search or not. Can be NULL.
LifetimeSubscription
Optional (boolean) true – evergreen subscriptions. false - subscriptions with a limited recurring billing cycle, typically no larger than 36 months. Can be NULL.
Page
Optional (int) A specific page of search results. Default value is 1. Can be NULL.
Limit
Optional (int) Number of results (subscriptions) displayed per page. Default value is 10. Can be NULL.
Request sample
Response parameters
Array of objects
Last updated
Was this helpful?