> For the complete documentation index, see [llms.txt](https://docs.2checkout.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.2checkout.com/api-reference/reference/subscription.md).

# Subscription

## GET /subscriptions/

> Search subscriptions

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/":{"get":{"tags":["Subscription"],"summary":"Search subscriptions","parameters":[{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","default":"application/json","enum":["application/json"]}},{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"CustomerEmail","in":"query","description":"Customer's email","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"DeliveredCode","in":"query","description":"Customer's delivered code","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"AvangateCustomerReference","in":"query","description":"Customer's reference","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"ExternalCustomerReference","in":"query","description":"Customer's external reference","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"Aggregate","in":"query","description":"Aggregated data, the only valid value is 'true'","required":false,"style":"form","explode":true,"schema":{"type":"boolean"}},{"name":"SubscriptionEnabled","in":"query","description":"Checks status","required":false,"style":"form","explode":true,"schema":{"type":"boolean"}},{"name":"RecurringEnabled","in":"query","description":"Filter by recurring status","required":false,"style":"form","explode":true,"schema":{"type":"boolean"}},{"name":"ProductCodes","in":"query","description":"Array of product codes","required":false,"style":"form","explode":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"CountryCodes","in":"query","description":"Array of countries codes","required":false,"style":"form","explode":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"PurchasedAfter","in":"query","description":"Purchase date","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"PurchasedBefore","in":"query","description":"Purchase date","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"ExpireAfter","in":"query","description":"Expire date","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"ExpireBefore","in":"query","description":"Expire date","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"RenewedAfter","in":"query","description":"Renew date","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"RenewedBefore","in":"query","description":"Renew date","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"NotificationAfter","in":"query","description":"Notification date","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"NotificationBefore","in":"query","description":"Notification date","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"ModifiedAfter","in":"query","description":"Change date","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"ModifiedBefore","in":"query","description":"Change date","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"NextBillingDateAfter","in":"query","description":"Start date of Next billing date filter","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"NextBillingDateBefore","in":"query","description":"End date of Next billing date filter","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"LifetimeSubscription","in":"query","description":"Filter by lifetime subscriptions","required":false,"style":"form","explode":true,"schema":{"type":"boolean"}},{"name":"Type","in":"query","description":"Subscription types","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"Page","in":"query","description":"Requested page","required":false,"style":"form","explode":true,"schema":{"type":"integer"}},{"name":"Limit","in":"query","description":"Limit number","required":false,"style":"form","explode":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"List subscriptions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_200_8"}}}}}}}},"components":{"schemas":{"inline_response_200_8":{"type":"object","properties":{"Items":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionResponse"}},"Pagination":{"$ref":"#/components/schemas/Pagination"}}},"SubscriptionResponse":{"type":"object","properties":{"SubscriptionReference":{"type":"string"},"StartDate":{"type":"string"},"ActivationDate":{"type":"string"},"ExpirationDate":{"type":"string"},"RecurringEnabled":{"type":"boolean"},"NextBillingDate":{"type":"string","default":"null","minLength":0,"maxLength":25},"SubscriptionEnabled":{"type":"boolean"},"Product":{"$ref":"#/components/schemas/Product"},"EndUser":{"$ref":"#/components/schemas/EndUser"},"SKU":{"type":"string"},"DeliveryInfo":{"$ref":"#/components/schemas/DeliveryInfo"},"ReceiveNotifications":{"type":"boolean"},"Lifetime":{"type":"boolean"},"PartnerCode":{"type":"string"},"ReasonText":{"type":"string"},"IdAffiliate":{"type":"integer"},"CustomerReference":{"type":"string"},"ExternalCustomerReference":{"type":"string"},"TestSubscription":{"type":"boolean"},"IsTrial":{"type":"boolean"},"Status":{"type":"string"},"LatestSubscriptionOrder":{"$ref":"#/components/schemas/LatestSubscriptionOrder"},"IsAssistedSale":{"type":"boolean"},"Billing":{"type":"object","properties":{"Quantity":{"type":"integer"},"Currency":{"type":"string"},"UnitBillingPriceNet":{"type":"number"},"UnitBillingPriceGross":{"type":"number"},"BillingPriceNet":{"type":"number"},"BillingPriceGross":{"type":"number"},"NoOfBillingCycles":{"type":"integer"},"CurrentBillingCycle":{"type":"integer"},"PayedBillingCycles":{"type":"integer"},"RemainingBillingCycles":{"type":"integer"},"CurrentBillingCycleEndDate":{"type":"string"},"TaxAmount":{"type":"number"},"TaxPercent":{"type":"number"},"BillingCyclesFrequency":{"type":"integer"},"BillingCycleFrequencyUnit":{"type":"string"},"ContractLength":{"type":"string","nullable":true},"ContractLengthUnit":{"type":"string"},"PriceOptions":{"type":"array","items":{"type":"object","properties":{"Code":{"type":"string"},"Options":{"type":"array","items":{"type":"object","properties":{"Value":{"type":"string"}}}}}}},"ActivationKey":{"type":"string","nullable":true}}}},"required":["NextBillingDate"]},"Product":{"type":"object","properties":{"AvangateId":{"type":"integer","description":"Unique, system-generated product ID (read-only)","nullable":true},"ProductCode":{"type":"string","description":"The unique product code you can define for each of your offerings"},"ExternalReference":{"type":"string","description":"External reference set when defining the product"},"ProductType":{"type":"string","enum":["REGULAR","BUNDLE"],"default":"REGULAR","description":"The type of the product (REGULAR or BUNDLE)"},"ProductName":{"type":"string","description":"The name of the product"},"ProductVersion":{"type":"string","description":"The product version number"},"ProductGroup":{"$ref":"#/components/schemas/Product_ProductGroup"},"PurchaseMultipleUnits":{"type":"boolean","description":"Customers can purchase multiple units (when set TRUE) or only one unit (when set FALSE) of this product","default":true},"ShippingClass":{"$ref":"#/components/schemas/products_ShippingClass"},"GiftOption":{"type":"boolean","default":false,"description":"True or false depending on whether the product can be gifted or not"},"ShortDescription":{"type":"string","default":"","description":"Product's short description"},"LongDescription":{"type":"string","default":"","description":"Product's long description"},"SystemRequirements":{"type":"string","default":"","description":"System requirements"},"ProductCategory":{"oneOf":[{"type":"string"},{"type":"boolean","default":false}],"description":"Product's category name"},"Platforms":{"type":"array","items":{"$ref":"#/components/schemas/products_Platforms"}},"ProductImages":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/products_ProductImages"}},"TrialUrl":{"type":"string","default":"","description":"The URL where shoppers can download trial software from"},"TrialDescription":{"type":"string","default":"","description":"Descriptive text entered for trials"},"Tangible":{"type":"boolean","description":"TRUE - for physical products, FALSE - for digital products"},"TangibleDetails":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Product_TangibleDetails"}]},"Enabled":{"type":"boolean","default":false,"description":"True/false depending on whether the products are active or disabled"},"ReviewProductUrl":{"type":"boolean","default":"","description":"The URL where the product can be reviewed before approval. Required if the \"Enabled\" property is sent as TRUE and the product needs to be reviewed by our internal teams before activation."},"ReviewAdditionalDetails":{"type":"boolean","default":"","description":"Additional information can be added to access the review of the product. Parameter is optional."},"AdditionalFields":{"type":"array","items":{"$ref":"#/components/schemas/products_AdditionalFields"}},"Translations":{"type":"array","items":{"$ref":"#/components/schemas/products_Translations"}},"PricingConfigurations":{"type":"array","items":{"$ref":"#/components/schemas/products_PricingConfigurations"}},"BundleProducts":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/product_BundledProducts"}},"Fulfillment":{"type":"string","enum":["NO_DELIVERY","INHERIT","BY_AVANGATE","BY_VENDOR"],"description":"Possible values BY_AVANGATE, BY_VENDOR, NO_DELIVERY"},"Prices":{"type":"array","description":"to be used when Pricing Configurations are not available for your account","items":{"$ref":"#/components/schemas/Product_PricingConfiguration_Price"}},"GeneratesSubscription":{"type":"boolean","default":false,"description":"TRUE or FALSE depending on whether you set the product to generate subscriptions or not"},"SubscriptionInformation":{"$ref":"#/components/schemas/products_SubscriptionInformation"},"FulfillmentInformation":{"$ref":"#/components/schemas/products_FulfillmentInformation"}}},"Product_ProductGroup":{"type":"object","properties":{"Code":{"description":"Unique, system-generated identifier assigned to product groups.","type":"string","nullable":true},"Description":{"description":"The description of the product group.","type":"string"},"Name":{"description":"The name of the product group.","type":"string"},"TemplateName":{"description":"Leave empty to assign the Default Template to the product or use the name of an active shopping cart template.","type":"string"}}},"products_ShippingClass":{"type":"object","properties":{"Amount":{"type":"string","description":"The shipping costs"},"ApplyTo":{"type":"string","description":"Possible values • PRODUCT • ORDER","nullable":true},"Currency":{"type":"string","description":"The currency ISO code used for shipping costs - ISO 4217."},"Name":{"type":"string","description":"The name of the shipping class"},"Type":{"type":"string","description":"Possible values • FIXED • PERCENT"}}},"products_Platforms":{"required":["Category","IdPlatform","PlatformName"],"type":"object","properties":{"Category":{"type":"string","description":"Platform category per product configuration."},"IdPlatform":{"description":"Platform ID per product configuration.","type":"string"},"PlatformName":{"type":"string","description":"The label of the platform per the product configuration."}}},"products_ProductImages":{"type":"object","properties":{"Default":{"type":"boolean","description":"True or False depending on whether you set the image stored at the address in the URL parameter as default or not."},"URL":{"type":"string","description":"The location of the image on the 2Checkout system."}}},"Product_TangibleDetails":{"type":"object","description":"Relevant only for tangible products; contains physical product setup information","properties":{"UnitDetails":{"type":"array","items":{"$ref":"#/components/schemas/Product_TangibleDetails_UnitDetails"}},"Fee":{"type":"array","items":{"$ref":"#/components/schemas/Product_TangibleDetails_HandlingFee"}}}},"Product_TangibleDetails_UnitDetails":{"type":"object","properties":{"Type":{"type":"string","description":"Product physical configuration type"},"Amount":{"type":"number","format":"float","description":"Product's tangible configuration type value"}}},"Product_TangibleDetails_HandlingFee":{"type":"object","properties":{"Currency":{"type":"string","description":"Currency of the handling fee"},"Amount":{"type":"number","format":"float","description":"Handling fee amount defined on the tangible product"}}},"products_AdditionalFields":{"type":"object","properties":{"Code":{"type":"string","description":"The code of the additional field assigned to a product."},"Enabled":{"type":"boolean","description":"True or false depending on whether the assigned product field is enabled or not."},"Label":{"type":"string","description":"The name of the additional field assigned to a product."},"Required":{"type":"boolean","description":"True or false depending on whether the assigned product field is required or not."},"URLParameter":{"type":"string","description":"The value of the system generated URL parameter for the product field that can be used in Buy Links."}}},"products_Translations":{"type":"object","properties":{"Description":{"type":"string","description":"Localized product short description."},"Language":{"type":"string","description":"ISO 639-1 two-letter code."},"LongDescription":{"type":"string","description":"The translated long description in the language corresponding to the Translation object."},"Name":{"type":"string","description":"Localized product name."},"SystemRequirements":{"type":"string","description":"Localized system requirements.","nullable":true},"TrialDescription":{"description":"Localized Trial description.","type":"string","nullable":true},"TrialUrl":{"type":"string","description":"The trial URL for users speaking the language corresponding to the Translation object.","nullable":true}}},"products_PricingConfigurations":{"type":"object","properties":{"BillingCountries":{"type":"array","description":"ISO codes of the countries assigned to the pricing configuration. Empty unless specific countries are assigned to a pricing configuration.","items":{"type":"string"}},"Code":{"type":"string","description":"System-generated identifier."},"Default":{"type":"boolean","description":"True for the default pricing configuration"},"DefaultCurrency":{"type":"string","description":"The ISO code of the default currency for the pricing configuration"},"Name":{"type":"string","description":"Pricing configuration name"},"PriceOptions":{"type":"array","items":{"$ref":"#/components/schemas/products_PriceOptions"}},"PriceType":{"type":"string","description":"Possible values - NET / GROSS"},"Prices":{"type":"array","items":{"$ref":"#/components/schemas/Product_PricingConfiguration_Price"}},"PricingSchema":{"type":"string","description":"DYNAMIC – With a base price or FLAT – Without a base price"}}},"products_PriceOptions":{"required":["Code","Required"],"type":"object","properties":{"Code":{"type":"string","description":"Price option identifier."},"Required":{"type":"boolean","description":"True or False depending on whether you want to make it mandatory for shoppers to select the price option during the purchase process."}}},"Product_PricingConfiguration_Price":{"required":["Amount","Currency","MaxQuantity","MinQuantity","OptionCodes"],"type":"object","properties":{"Amount":{"type":"number","description":"The price of the product."},"Currency":{"type":"string","description":"ISO code of the currency for the product price."},"MaxQuantity":{"type":"string","description":"The maximum quantity of volume discounts. Default is 99999."},"MinQuantity":{"type":"string","description":"The minimum quantity of volume discounts. Default is 1."},"OptionCodes":{"description":"Price option identifier.","type":"array","items":{}}}},"product_BundledProducts":{"type":"object","properties":{"ProductId":{"type":"string","description":"Unique, system-generated product ID"},"ProductCode":{"type":"string","description":"Editable product code that you control"}}},"products_SubscriptionInformation":{"type":"object","properties":{"BillingCycle":{"description":"\"The number of subscription billing cycle units (months or days).  Possible values:","type":"string"},"BillingCycleUnits":{"type":"string","description":"The units of the billing cycle - M for months or D for days"},"BundleRenewalManagement":{"type":"string","description":"The number of subscription billing cycle units (months or days).  Possible values - 0 (zero represents a one-time fee) Days 7 8 9 10 11 12 13 14 Months 1 2 3 6 12 15 18 24 36 (max)"},"ContractPeriod":{"$ref":"#/components/schemas/products_SubscriptionInformation_ContractPeriod"},"DeprecatedProducts":{"type":"array","items":{"type":"string","description":"Deprecated products."}},"GracePeriod":{"$ref":"#/components/schemas/products_SubscriptionInformation_GracePeriod"},"IsOneTimeFee":{"type":"boolean","description":"True or False depending on whether the subscription is evergreen or not."},"RenewalEmails":{"$ref":"#/components/schemas/products_SubscriptionInformation_RenewalEmails"},"UsageBilling":{"description":"The usage billing interval must be smaller than or equal to the grace period.","type":"number"}}},"products_SubscriptionInformation_ContractPeriod":{"type":"object","properties":{"Action":{"type":"string","description":"The action performed after the subscription expires. Possible values CANCEL | RESTART"},"EmailsDuringContract":{"type":"boolean","description":"True or False depending on whether you suppress renewal notification emails throughout the duration of the contract or not."},"IsUnlimited":{"type":"boolean","description":"This flag is true if the contract is for an unlimited period"},"Period":{"type":"number","description":"The contract period in months or days. -1 for unlimited contracts."},"PeriodUnits":{"type":"string","nullable":true,"description":"The contract period units - days | months"}}},"products_SubscriptionInformation_GracePeriod":{"type":"object","properties":{"IsUnlimited":{"type":"boolean","description":"TRUE or FALSE depending on whether you set the grace period to unlimited or not."},"Period":{"type":"string","description":"Number of days set for the grace period."},"PeriodUnits":{"type":"string","description":"D - Days."},"Type":{"type":"string","description":"CUSTOM – you configured grace period setting at product level. GLOBAL – global grace period settings apply."}}},"products_SubscriptionInformation_RenewalEmails":{"type":"object","properties":{"Settings":{"$ref":"#/components/schemas/products_SubscriptionInformation_RenewalEmails_Settings"},"Type":{"type":"string","description":"GLOBAL - Send emails according to the global renewal notification settings. CUSTOM – per product renewal notification settings"}}},"products_SubscriptionInformation_RenewalEmails_Settings":{"type":"object","properties":{"AutomaticRenewal":{"$ref":"#/components/schemas/products_SubscriptionInformation_RenewalEmails_Settings_AutomaticRenewal"},"ManualRenewal":{"$ref":"#/components/schemas/products_SubscriptionInformation_RenewalEmails_Settings_AutomaticRenewal"}}},"products_SubscriptionInformation_RenewalEmails_Settings_AutomaticRenewal":{"type":"object","properties":{"After15Days":{"type":"boolean","description":"True or False."},"After5Days":{"type":"boolean","description":"True or False."},"Before15Days":{"type":"boolean","description":"True or False."},"Before1Day":{"type":"boolean","description":"True or False."},"Before30Days":{"type":"boolean","description":"True or False."},"Before7Days":{"type":"boolean","description":"True or False."},"OnExpirationDate":{"type":"boolean","description":"True or False."}}},"products_FulfillmentInformation":{"type":"object","properties":{"AdditionalInformationByEmail":{"type":"string","description":"The text you set up in the Additional fulfillment information - by email area."},"AdditionalInformationEmailTranslations":{"description":"Array of localized Additional fulfillment information - by email texts.","type":"array","items":{"$ref":"#/components/schemas/products_FulfillmentInformation_AdditionalInformationEmailTranslations"}},"AdditionalThankYouPage":{"type":"string","description":"The text you set up in the Additional fulfillment information - \"Thank you\" page area."},"AdditionalThankYouPageTranslations":{"description":"Array of localized Additional fulfillment information - \"Thank you\" page texts.","type":"array","items":{"$ref":"#/components/schemas/products_FulfillmentInformation_AdditionalInformationEmailTranslations"}},"BackupMedia":{"$ref":"#/components/schemas/products_FulfillmentInformation_BackupMedia"},"CodeList":{"$ref":"#/components/schemas/products_FulfillmentInformation_BackupMedia"},"IsBackupMedia":{"type":"boolean","description":"True or False. Depending on whether you configure the delivery of backup media or not."},"IsDisplayInPartnersCPanel":{"type":"boolean","description":"True or False. Depending on whether you share access to the product file with your channel partners or not."},"IsDownloadInsuranceService":{"type":"boolean","description":"True or False. Depending on whether you enable the Download Insurance Service or not, for a product for which you configure a product file."},"IsDownloadLink":{"type":"boolean","description":"True or False. Depending on whether you configure the delivery of a product file or not."},"IsElectronicCode":{"type":"boolean","description":"True or False. Depending on whether you configure the delivery of keys/codes for the product or not."},"IsInstantDeliveryThankYouPage":{"description":"True or False. Depending on whether you enable instant delivery in the Thank You page or not.","type":"boolean"},"IsStartAfterFulfillment":{"type":"boolean","description":"True or False. Depending on whether you want the subscription lifetime to start afther the completion of the fulfillment process or not."},"ProductFile":{"$ref":"#/components/schemas/products_FulfillmentInformation_ProductFile"}}},"products_FulfillmentInformation_AdditionalInformationEmailTranslations":{"type":"object","properties":{"Description":{"type":"string","description":"Array of localized Additional fulfillment information - \"Thank you\" page texts."},"Language":{"description":"ISO 639-1 two-letter code.","type":"string"},"Name":{"type":"string","nullable":true}}},"products_FulfillmentInformation_BackupMedia":{"type":"object","properties":{"Code":{"type":"string","description":"The unique code list identifier."},"Name":{"type":"string","description":"Name of the code list."},"Type":{"type":"string","description":"Code list type Static or Dynamic"}}},"products_FulfillmentInformation_ProductFile":{"type":"object","properties":{"Code":{"type":"string","description":"Unique product file identifier."},"File":{"type":"string","description":"Name of the product file."},"LastUpdate":{"type":"string","description":"YYYY-MM-DD HH-MM-SS. Date time stamp when you last updated the file."},"Name":{"type":"string","description":"Display name."},"Size":{"type":"string","description":"File size."},"Type":{"type":"string","description":"File type."},"Version":{"type":"string","description":"File version."}}},"EndUser":{"type":"object","properties":{"FirstName":{"type":"string"},"LastName":{"type":"string"},"Email":{"type":"string"},"Company":{"type":"string"},"FiscalCode":{"type":"string"},"Phone":{"type":"string"},"Fax":{"type":"string"},"Address1":{"type":"string"},"Address2":{"type":"string"},"Zip":{"type":"string"},"City":{"type":"string"},"State":{"type":"string"},"CountryCode":{"type":"string"},"Language":{"type":"string"}}},"DeliveryInfo":{"type":"object","properties":{"Description":{"type":"string"},"Codes":{"$ref":"#/components/schemas/DeliveryInfo_Codes"}}},"DeliveryInfo_Codes":{"type":"array","items":{"$ref":"#/components/schemas/DeliveryInfoCode"}},"DeliveryInfoCode":{"type":"object","properties":{"Code":{"type":"string"},"File":{"type":"string"},"Description":{"type":"string"},"ExtraInfo":{"type":"string"}}},"LatestSubscriptionOrder":{"type":"object","properties":{"RefNo":{"type":"integer"},"Status":{"type":"string"},"FailedRecurringChargesCount":{"type":"integer"}}},"Pagination":{"type":"object","properties":{"Page":{"type":"integer"},"Limit":{"type":"integer"},"Count":{"type":"integer"}}}}}}
```

## POST /subscriptions/

> Import test subscriptions with card information

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/":{"post":{"tags":["Subscription"],"summary":"Import test subscriptions with card information","parameters":[{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","enum":["application/json"]}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body_16"}}}},"responses":{"201":{"description":"***\n\n**Overview**\n\nImport test subscription and data from your or a third-party system with payment information assigned, and test advanced renewal and upgrade scenarios in the 2Checkout platform. Contact 2Checkout directly for additional details.\n\n***\n\n**Requirements**\n\nTest subscriptions can be imported only for **eStore** orders. Only **dummy credit card data** can be assigned to subscriptions.\n<a href=\"https://verifone.cloud/docs/2checkout/Documentation/09Test_ordering_system/01Test_payment_methods\">Check here</a> the list of credit cards that can be used for import.\n\n**Cardholder** name is composed as FirstName + \" \" + LastName.","content":{"application/json":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"body_16":{"type":"object","properties":{"AdditionalInfo":{"description":"Extra information that you can attach to a subscription, such as the source of the initial purchase.","nullable":true},"CustomPriceBillingCyclesLeft":{"description":"Mandatory when you send NextRenewalPrice. 2Checkout applies the next renewal price to the number of billing cycles you define.","type":"number"},"DeliveryInfo":{"$ref":"#/components/schemas/subscriptions_DeliveryInfo"},"EndUser":{"$ref":"#/components/schemas/subscriptions_EndUser"},"ExpirationDate":{"description":"Subscription expiration date(YYYY-MM-DD) - ExpirationDate is mandatory when importing subscription data. If you changed the time zone for the 2Checkout API by editing system settings under Account settings, then the ExpirationDate you provide must be in accordance with your custom configuration.","type":"string"},"ExternalCustomerReference":{"description":"Customer identifier you control.","nullable":true},"ExternalSubscriptionReference":{"description":"Unique identifier for your subscription. Mandatory when importing subscription data.","type":"string"},"NextRenewalPrice":{"description":"The future costs that subscribers would incur when their subscriptions are renewed. When provided, you must accompany it by NextRenewalPriceCurrency and CustomPriceBillingCyclesLeft.","type":"number"},"NextRenewalPriceCurrency":{"description":"Mandatory when you send CustomPriceBillingCyclesLeft. The currency associated with the subscription next renewal price value.","type":"string"},"PartnerCode":{"description":"\"• Empty: for ecommerce orders","type":"string"},"Payment":{"$ref":"#/components/schemas/subscriptions_Payment"},"Product":{"$ref":"#/components/schemas/subscriptions_Product"},"StartDate":{"description":"Subscription start date(YYYY-MM-DD) - StartDate is mandatory when importing subscription data. If you changed the time zone for the 2Checkout API by editing system settings under Account settings, then the StartDate you provide must be in accordance with your custom configuration.","type":"string"},"ActivationDate":{"type":"string","nullable":true},"SubscriptionValue":{"description":"The value of the subscription","type":"number"},"SubscriptionValueCurrency":{"description":"Mandatory when you also send the Value parameter. The currency associated to the subscription value.","type":"string"},"Test":{"description":"Available only for eStore subscriptions. Use 1 to import a test subscription. Exclude the parameter or set the value to 0 to import regular subscriptions. Test subscriptions enable you to try out flows like manual and auto renewal, and upgrade.","type":"number"}}},"subscriptions_DeliveryInfo":{"type":"object","properties":{"Codes":{"type":"array","items":{"$ref":"#/components/schemas/subscriptions_DeliveryInfo_Codes"}},"Description":{"nullable":true}}},"subscriptions_DeliveryInfo_Codes":{"type":"object","properties":{"Code":{"description":"Delivered activation key/code.","type":"string"},"Description":{"description":"Code description for dynamic lists from your key generator.","nullable":true},"ExtraInfo":{"description":"Info set by your key generator for dynamic lists only.","nullable":true},"File":{"description":"The name of the delivered file.","nullable":true}}},"subscriptions_EndUser":{"type":"object","properties":{"Address1":{"description":"End user first address line.","type":"string"},"Address2":{"description":"End user second address line.","type":"string"},"City":{"description":"End user city.","type":"string"},"Company":{"description":"End user company name.","type":"string"},"CountryCode":{"description":"End user country code [ISO3166-1 Alpha 2].","type":"string"},"Email":{"description":"End user email address.","type":"string"},"Fax":{"description":"End user fax.","type":"string"},"FirstName":{"description":"End user's first name","type":"string"},"Language":{"description":"Language [ISO639-2] the 2Checkout system uses for communications.","type":"string"},"LastName":{"description":"End user's last name","type":"string"},"Phone":{"description":"End user phone number.","type":"string"},"State":{"description":"End user state.","type":"string"},"Zip":{"description":"End user zip code.","type":"string"}}},"subscriptions_Payment":{"type":"object","properties":{"CCID":{"description":"Credit Card Identification - an extra ID printed on the card, usually a 3-4 digit number, the CVC2/CVV2.","type":"string"},"CardNumber":{"description":"The credit/debit card number.","type":"string"},"CardType":{"description":"VISA, VISAELECTRON, MASTERCARD, MAESTRO, AMEX, DISCOVER, DANKORT, CARTEBLEUE, JCB.","type":"string"},"ExpirationMonth":{"description":"The month in which the card expires.","type":"string"},"ExpirationYear":{"description":"The year in which the card expires.","type":"string"},"HolderName":{"description":"Card holder name.","type":"string"}}},"subscriptions_Product":{"type":"object","properties":{"PriceOptionCodes":{"description":"The product options codes the customer selected when acquiring the subscription. Pricing options codes are case sensitive.","type":"array","items":{"type":"string"}},"ProductCode":{"description":"Unique product identifier that you control.","type":"string"},"ProductId":{"description":"Unique, system-generated product identifier.","type":"string"},"ProductName":{"description":"Product name.","type":"string"},"ProductQuantity":{"description":"Ordered number of units.","type":"number"},"ProductVersion":{"description":"Product version.","type":"string"}}}}}}
```

## GET /subscriptions/{SubscriptionReference}/

> Retrieve a subscription

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/":{"get":{"tags":["Subscription"],"summary":"Retrieve a subscription","parameters":[{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","default":"application/json","enum":["application/json"]}},{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"SubscriptionReference","in":"path","description":"Unique code which represents a subscription","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Get subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResponse"}}}}}}}},"components":{"schemas":{"SubscriptionResponse":{"type":"object","properties":{"SubscriptionReference":{"type":"string"},"StartDate":{"type":"string"},"ActivationDate":{"type":"string"},"ExpirationDate":{"type":"string"},"RecurringEnabled":{"type":"boolean"},"NextBillingDate":{"type":"string","default":"null","minLength":0,"maxLength":25},"SubscriptionEnabled":{"type":"boolean"},"Product":{"$ref":"#/components/schemas/Product"},"EndUser":{"$ref":"#/components/schemas/EndUser"},"SKU":{"type":"string"},"DeliveryInfo":{"$ref":"#/components/schemas/DeliveryInfo"},"ReceiveNotifications":{"type":"boolean"},"Lifetime":{"type":"boolean"},"PartnerCode":{"type":"string"},"ReasonText":{"type":"string"},"IdAffiliate":{"type":"integer"},"CustomerReference":{"type":"string"},"ExternalCustomerReference":{"type":"string"},"TestSubscription":{"type":"boolean"},"IsTrial":{"type":"boolean"},"Status":{"type":"string"},"LatestSubscriptionOrder":{"$ref":"#/components/schemas/LatestSubscriptionOrder"},"IsAssistedSale":{"type":"boolean"},"Billing":{"type":"object","properties":{"Quantity":{"type":"integer"},"Currency":{"type":"string"},"UnitBillingPriceNet":{"type":"number"},"UnitBillingPriceGross":{"type":"number"},"BillingPriceNet":{"type":"number"},"BillingPriceGross":{"type":"number"},"NoOfBillingCycles":{"type":"integer"},"CurrentBillingCycle":{"type":"integer"},"PayedBillingCycles":{"type":"integer"},"RemainingBillingCycles":{"type":"integer"},"CurrentBillingCycleEndDate":{"type":"string"},"TaxAmount":{"type":"number"},"TaxPercent":{"type":"number"},"BillingCyclesFrequency":{"type":"integer"},"BillingCycleFrequencyUnit":{"type":"string"},"ContractLength":{"type":"string","nullable":true},"ContractLengthUnit":{"type":"string"},"PriceOptions":{"type":"array","items":{"type":"object","properties":{"Code":{"type":"string"},"Options":{"type":"array","items":{"type":"object","properties":{"Value":{"type":"string"}}}}}}},"ActivationKey":{"type":"string","nullable":true}}}},"required":["NextBillingDate"]},"Product":{"type":"object","properties":{"AvangateId":{"type":"integer","description":"Unique, system-generated product ID (read-only)","nullable":true},"ProductCode":{"type":"string","description":"The unique product code you can define for each of your offerings"},"ExternalReference":{"type":"string","description":"External reference set when defining the product"},"ProductType":{"type":"string","enum":["REGULAR","BUNDLE"],"default":"REGULAR","description":"The type of the product (REGULAR or BUNDLE)"},"ProductName":{"type":"string","description":"The name of the product"},"ProductVersion":{"type":"string","description":"The product version number"},"ProductGroup":{"$ref":"#/components/schemas/Product_ProductGroup"},"PurchaseMultipleUnits":{"type":"boolean","description":"Customers can purchase multiple units (when set TRUE) or only one unit (when set FALSE) of this product","default":true},"ShippingClass":{"$ref":"#/components/schemas/products_ShippingClass"},"GiftOption":{"type":"boolean","default":false,"description":"True or false depending on whether the product can be gifted or not"},"ShortDescription":{"type":"string","default":"","description":"Product's short description"},"LongDescription":{"type":"string","default":"","description":"Product's long description"},"SystemRequirements":{"type":"string","default":"","description":"System requirements"},"ProductCategory":{"oneOf":[{"type":"string"},{"type":"boolean","default":false}],"description":"Product's category name"},"Platforms":{"type":"array","items":{"$ref":"#/components/schemas/products_Platforms"}},"ProductImages":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/products_ProductImages"}},"TrialUrl":{"type":"string","default":"","description":"The URL where shoppers can download trial software from"},"TrialDescription":{"type":"string","default":"","description":"Descriptive text entered for trials"},"Tangible":{"type":"boolean","description":"TRUE - for physical products, FALSE - for digital products"},"TangibleDetails":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Product_TangibleDetails"}]},"Enabled":{"type":"boolean","default":false,"description":"True/false depending on whether the products are active or disabled"},"ReviewProductUrl":{"type":"boolean","default":"","description":"The URL where the product can be reviewed before approval. Required if the \"Enabled\" property is sent as TRUE and the product needs to be reviewed by our internal teams before activation."},"ReviewAdditionalDetails":{"type":"boolean","default":"","description":"Additional information can be added to access the review of the product. Parameter is optional."},"AdditionalFields":{"type":"array","items":{"$ref":"#/components/schemas/products_AdditionalFields"}},"Translations":{"type":"array","items":{"$ref":"#/components/schemas/products_Translations"}},"PricingConfigurations":{"type":"array","items":{"$ref":"#/components/schemas/products_PricingConfigurations"}},"BundleProducts":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/product_BundledProducts"}},"Fulfillment":{"type":"string","enum":["NO_DELIVERY","INHERIT","BY_AVANGATE","BY_VENDOR"],"description":"Possible values BY_AVANGATE, BY_VENDOR, NO_DELIVERY"},"Prices":{"type":"array","description":"to be used when Pricing Configurations are not available for your account","items":{"$ref":"#/components/schemas/Product_PricingConfiguration_Price"}},"GeneratesSubscription":{"type":"boolean","default":false,"description":"TRUE or FALSE depending on whether you set the product to generate subscriptions or not"},"SubscriptionInformation":{"$ref":"#/components/schemas/products_SubscriptionInformation"},"FulfillmentInformation":{"$ref":"#/components/schemas/products_FulfillmentInformation"}}},"Product_ProductGroup":{"type":"object","properties":{"Code":{"description":"Unique, system-generated identifier assigned to product groups.","type":"string","nullable":true},"Description":{"description":"The description of the product group.","type":"string"},"Name":{"description":"The name of the product group.","type":"string"},"TemplateName":{"description":"Leave empty to assign the Default Template to the product or use the name of an active shopping cart template.","type":"string"}}},"products_ShippingClass":{"type":"object","properties":{"Amount":{"type":"string","description":"The shipping costs"},"ApplyTo":{"type":"string","description":"Possible values • PRODUCT • ORDER","nullable":true},"Currency":{"type":"string","description":"The currency ISO code used for shipping costs - ISO 4217."},"Name":{"type":"string","description":"The name of the shipping class"},"Type":{"type":"string","description":"Possible values • FIXED • PERCENT"}}},"products_Platforms":{"required":["Category","IdPlatform","PlatformName"],"type":"object","properties":{"Category":{"type":"string","description":"Platform category per product configuration."},"IdPlatform":{"description":"Platform ID per product configuration.","type":"string"},"PlatformName":{"type":"string","description":"The label of the platform per the product configuration."}}},"products_ProductImages":{"type":"object","properties":{"Default":{"type":"boolean","description":"True or False depending on whether you set the image stored at the address in the URL parameter as default or not."},"URL":{"type":"string","description":"The location of the image on the 2Checkout system."}}},"Product_TangibleDetails":{"type":"object","description":"Relevant only for tangible products; contains physical product setup information","properties":{"UnitDetails":{"type":"array","items":{"$ref":"#/components/schemas/Product_TangibleDetails_UnitDetails"}},"Fee":{"type":"array","items":{"$ref":"#/components/schemas/Product_TangibleDetails_HandlingFee"}}}},"Product_TangibleDetails_UnitDetails":{"type":"object","properties":{"Type":{"type":"string","description":"Product physical configuration type"},"Amount":{"type":"number","format":"float","description":"Product's tangible configuration type value"}}},"Product_TangibleDetails_HandlingFee":{"type":"object","properties":{"Currency":{"type":"string","description":"Currency of the handling fee"},"Amount":{"type":"number","format":"float","description":"Handling fee amount defined on the tangible product"}}},"products_AdditionalFields":{"type":"object","properties":{"Code":{"type":"string","description":"The code of the additional field assigned to a product."},"Enabled":{"type":"boolean","description":"True or false depending on whether the assigned product field is enabled or not."},"Label":{"type":"string","description":"The name of the additional field assigned to a product."},"Required":{"type":"boolean","description":"True or false depending on whether the assigned product field is required or not."},"URLParameter":{"type":"string","description":"The value of the system generated URL parameter for the product field that can be used in Buy Links."}}},"products_Translations":{"type":"object","properties":{"Description":{"type":"string","description":"Localized product short description."},"Language":{"type":"string","description":"ISO 639-1 two-letter code."},"LongDescription":{"type":"string","description":"The translated long description in the language corresponding to the Translation object."},"Name":{"type":"string","description":"Localized product name."},"SystemRequirements":{"type":"string","description":"Localized system requirements.","nullable":true},"TrialDescription":{"description":"Localized Trial description.","type":"string","nullable":true},"TrialUrl":{"type":"string","description":"The trial URL for users speaking the language corresponding to the Translation object.","nullable":true}}},"products_PricingConfigurations":{"type":"object","properties":{"BillingCountries":{"type":"array","description":"ISO codes of the countries assigned to the pricing configuration. Empty unless specific countries are assigned to a pricing configuration.","items":{"type":"string"}},"Code":{"type":"string","description":"System-generated identifier."},"Default":{"type":"boolean","description":"True for the default pricing configuration"},"DefaultCurrency":{"type":"string","description":"The ISO code of the default currency for the pricing configuration"},"Name":{"type":"string","description":"Pricing configuration name"},"PriceOptions":{"type":"array","items":{"$ref":"#/components/schemas/products_PriceOptions"}},"PriceType":{"type":"string","description":"Possible values - NET / GROSS"},"Prices":{"type":"array","items":{"$ref":"#/components/schemas/Product_PricingConfiguration_Price"}},"PricingSchema":{"type":"string","description":"DYNAMIC – With a base price or FLAT – Without a base price"}}},"products_PriceOptions":{"required":["Code","Required"],"type":"object","properties":{"Code":{"type":"string","description":"Price option identifier."},"Required":{"type":"boolean","description":"True or False depending on whether you want to make it mandatory for shoppers to select the price option during the purchase process."}}},"Product_PricingConfiguration_Price":{"required":["Amount","Currency","MaxQuantity","MinQuantity","OptionCodes"],"type":"object","properties":{"Amount":{"type":"number","description":"The price of the product."},"Currency":{"type":"string","description":"ISO code of the currency for the product price."},"MaxQuantity":{"type":"string","description":"The maximum quantity of volume discounts. Default is 99999."},"MinQuantity":{"type":"string","description":"The minimum quantity of volume discounts. Default is 1."},"OptionCodes":{"description":"Price option identifier.","type":"array","items":{}}}},"product_BundledProducts":{"type":"object","properties":{"ProductId":{"type":"string","description":"Unique, system-generated product ID"},"ProductCode":{"type":"string","description":"Editable product code that you control"}}},"products_SubscriptionInformation":{"type":"object","properties":{"BillingCycle":{"description":"\"The number of subscription billing cycle units (months or days).  Possible values:","type":"string"},"BillingCycleUnits":{"type":"string","description":"The units of the billing cycle - M for months or D for days"},"BundleRenewalManagement":{"type":"string","description":"The number of subscription billing cycle units (months or days).  Possible values - 0 (zero represents a one-time fee) Days 7 8 9 10 11 12 13 14 Months 1 2 3 6 12 15 18 24 36 (max)"},"ContractPeriod":{"$ref":"#/components/schemas/products_SubscriptionInformation_ContractPeriod"},"DeprecatedProducts":{"type":"array","items":{"type":"string","description":"Deprecated products."}},"GracePeriod":{"$ref":"#/components/schemas/products_SubscriptionInformation_GracePeriod"},"IsOneTimeFee":{"type":"boolean","description":"True or False depending on whether the subscription is evergreen or not."},"RenewalEmails":{"$ref":"#/components/schemas/products_SubscriptionInformation_RenewalEmails"},"UsageBilling":{"description":"The usage billing interval must be smaller than or equal to the grace period.","type":"number"}}},"products_SubscriptionInformation_ContractPeriod":{"type":"object","properties":{"Action":{"type":"string","description":"The action performed after the subscription expires. Possible values CANCEL | RESTART"},"EmailsDuringContract":{"type":"boolean","description":"True or False depending on whether you suppress renewal notification emails throughout the duration of the contract or not."},"IsUnlimited":{"type":"boolean","description":"This flag is true if the contract is for an unlimited period"},"Period":{"type":"number","description":"The contract period in months or days. -1 for unlimited contracts."},"PeriodUnits":{"type":"string","nullable":true,"description":"The contract period units - days | months"}}},"products_SubscriptionInformation_GracePeriod":{"type":"object","properties":{"IsUnlimited":{"type":"boolean","description":"TRUE or FALSE depending on whether you set the grace period to unlimited or not."},"Period":{"type":"string","description":"Number of days set for the grace period."},"PeriodUnits":{"type":"string","description":"D - Days."},"Type":{"type":"string","description":"CUSTOM – you configured grace period setting at product level. GLOBAL – global grace period settings apply."}}},"products_SubscriptionInformation_RenewalEmails":{"type":"object","properties":{"Settings":{"$ref":"#/components/schemas/products_SubscriptionInformation_RenewalEmails_Settings"},"Type":{"type":"string","description":"GLOBAL - Send emails according to the global renewal notification settings. CUSTOM – per product renewal notification settings"}}},"products_SubscriptionInformation_RenewalEmails_Settings":{"type":"object","properties":{"AutomaticRenewal":{"$ref":"#/components/schemas/products_SubscriptionInformation_RenewalEmails_Settings_AutomaticRenewal"},"ManualRenewal":{"$ref":"#/components/schemas/products_SubscriptionInformation_RenewalEmails_Settings_AutomaticRenewal"}}},"products_SubscriptionInformation_RenewalEmails_Settings_AutomaticRenewal":{"type":"object","properties":{"After15Days":{"type":"boolean","description":"True or False."},"After5Days":{"type":"boolean","description":"True or False."},"Before15Days":{"type":"boolean","description":"True or False."},"Before1Day":{"type":"boolean","description":"True or False."},"Before30Days":{"type":"boolean","description":"True or False."},"Before7Days":{"type":"boolean","description":"True or False."},"OnExpirationDate":{"type":"boolean","description":"True or False."}}},"products_FulfillmentInformation":{"type":"object","properties":{"AdditionalInformationByEmail":{"type":"string","description":"The text you set up in the Additional fulfillment information - by email area."},"AdditionalInformationEmailTranslations":{"description":"Array of localized Additional fulfillment information - by email texts.","type":"array","items":{"$ref":"#/components/schemas/products_FulfillmentInformation_AdditionalInformationEmailTranslations"}},"AdditionalThankYouPage":{"type":"string","description":"The text you set up in the Additional fulfillment information - \"Thank you\" page area."},"AdditionalThankYouPageTranslations":{"description":"Array of localized Additional fulfillment information - \"Thank you\" page texts.","type":"array","items":{"$ref":"#/components/schemas/products_FulfillmentInformation_AdditionalInformationEmailTranslations"}},"BackupMedia":{"$ref":"#/components/schemas/products_FulfillmentInformation_BackupMedia"},"CodeList":{"$ref":"#/components/schemas/products_FulfillmentInformation_BackupMedia"},"IsBackupMedia":{"type":"boolean","description":"True or False. Depending on whether you configure the delivery of backup media or not."},"IsDisplayInPartnersCPanel":{"type":"boolean","description":"True or False. Depending on whether you share access to the product file with your channel partners or not."},"IsDownloadInsuranceService":{"type":"boolean","description":"True or False. Depending on whether you enable the Download Insurance Service or not, for a product for which you configure a product file."},"IsDownloadLink":{"type":"boolean","description":"True or False. Depending on whether you configure the delivery of a product file or not."},"IsElectronicCode":{"type":"boolean","description":"True or False. Depending on whether you configure the delivery of keys/codes for the product or not."},"IsInstantDeliveryThankYouPage":{"description":"True or False. Depending on whether you enable instant delivery in the Thank You page or not.","type":"boolean"},"IsStartAfterFulfillment":{"type":"boolean","description":"True or False. Depending on whether you want the subscription lifetime to start afther the completion of the fulfillment process or not."},"ProductFile":{"$ref":"#/components/schemas/products_FulfillmentInformation_ProductFile"}}},"products_FulfillmentInformation_AdditionalInformationEmailTranslations":{"type":"object","properties":{"Description":{"type":"string","description":"Array of localized Additional fulfillment information - \"Thank you\" page texts."},"Language":{"description":"ISO 639-1 two-letter code.","type":"string"},"Name":{"type":"string","nullable":true}}},"products_FulfillmentInformation_BackupMedia":{"type":"object","properties":{"Code":{"type":"string","description":"The unique code list identifier."},"Name":{"type":"string","description":"Name of the code list."},"Type":{"type":"string","description":"Code list type Static or Dynamic"}}},"products_FulfillmentInformation_ProductFile":{"type":"object","properties":{"Code":{"type":"string","description":"Unique product file identifier."},"File":{"type":"string","description":"Name of the product file."},"LastUpdate":{"type":"string","description":"YYYY-MM-DD HH-MM-SS. Date time stamp when you last updated the file."},"Name":{"type":"string","description":"Display name."},"Size":{"type":"string","description":"File size."},"Type":{"type":"string","description":"File type."},"Version":{"type":"string","description":"File version."}}},"EndUser":{"type":"object","properties":{"FirstName":{"type":"string"},"LastName":{"type":"string"},"Email":{"type":"string"},"Company":{"type":"string"},"FiscalCode":{"type":"string"},"Phone":{"type":"string"},"Fax":{"type":"string"},"Address1":{"type":"string"},"Address2":{"type":"string"},"Zip":{"type":"string"},"City":{"type":"string"},"State":{"type":"string"},"CountryCode":{"type":"string"},"Language":{"type":"string"}}},"DeliveryInfo":{"type":"object","properties":{"Description":{"type":"string"},"Codes":{"$ref":"#/components/schemas/DeliveryInfo_Codes"}}},"DeliveryInfo_Codes":{"type":"array","items":{"$ref":"#/components/schemas/DeliveryInfoCode"}},"DeliveryInfoCode":{"type":"object","properties":{"Code":{"type":"string"},"File":{"type":"string"},"Description":{"type":"string"},"ExtraInfo":{"type":"string"}}},"LatestSubscriptionOrder":{"type":"object","properties":{"RefNo":{"type":"integer"},"Status":{"type":"string"},"FailedRecurringChargesCount":{"type":"integer"}}}}}}
```

## POST /subscriptions/{SubscriptionReference}/

> Enable a subscription

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/":{"post":{"tags":["Subscription"],"summary":"Enable a subscription","parameters":[{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","enum":["application/json"]}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}}}}}}}
```

## PUT /subscriptions/{SubscriptionReference}/

> Update a subscription

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/":{"put":{"tags":["Subscription"],"summary":"Update a subscription","parameters":[{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","enum":["application/json"]}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body_17"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"body_17":{"type":"object","properties":{"EndUser":{"$ref":"#/components/schemas/subscriptions_EndUser"},"StartDate":{"description":"Subscription start date(YYYY-MM-DD) - StartDate is mandatory when importing subscription data. If you changed the time zone for the 2Checkout API by editing system settings under Account settings, then the StartDate you provide must be in accordance with your custom configuration.","type":"string"},"ExpirationDate":{"description":"Subscription expiration date - If you changed the time zone for the 2Checkout API by editing system settings under Account settings, then 2Checkout calculates the ExpirationDate according to your custom configuration. Note: The default 2Checkout API time zone is GMT+02:00. You cannot set an expiration date from the past.","type":"string"},"ExternalCustomerReference":{"description":"Customer identifier you control.","nullable":true},"Product":{"$ref":"#/components/schemas/subscriptionsSubscriptionReference_Product"},"RecurringEnabled":{"description":"Possible values: TRUE/FALSE","type":"boolean"},"SubscriptionEnabled":{"description":"Possible values: TRUE/FALSE","type":"boolean"},"ChurnReasons":{"description":"\"This payload can be sent only when the Subscription object (from above) will have RecurringEnabled set as TRUE. Possible values for this field are:","type":"array","items":{"type":"string"}},"ChurnReasonOther":{"description":"This field should have a value only if the ChurnReasons has the CHURN_REASON_EXTRAORDINARY or CHURN_REASON_OTHER values","type":"string"}}},"subscriptions_EndUser":{"type":"object","properties":{"Address1":{"description":"End user first address line.","type":"string"},"Address2":{"description":"End user second address line.","type":"string"},"City":{"description":"End user city.","type":"string"},"Company":{"description":"End user company name.","type":"string"},"CountryCode":{"description":"End user country code [ISO3166-1 Alpha 2].","type":"string"},"Email":{"description":"End user email address.","type":"string"},"Fax":{"description":"End user fax.","type":"string"},"FirstName":{"description":"End user's first name","type":"string"},"Language":{"description":"Language [ISO639-2] the 2Checkout system uses for communications.","type":"string"},"LastName":{"description":"End user's last name","type":"string"},"Phone":{"description":"End user phone number.","type":"string"},"State":{"description":"End user state.","type":"string"},"Zip":{"description":"End user zip code.","type":"string"}}},"subscriptionsSubscriptionReference_Product":{"type":"object","properties":{"PriceOptionCodes":{"description":"Array of product options codes. Pricing options codes are case sensitive. To impact the renewal price, the PriceOptionsCodes need to belong to price options of pricing configurations used for the product with which the subscription is associated.","type":"array","items":{"type":"string"}},"ProductId":{"description":"System-generated unique product ID. Needs to be the ID of an existing product in the 2Checkout system created under your account.The product ID governs the product to which the subscription is associated with. Product types must match Regular - Regular or Bundle - Bundle. IDs must identify products with the renewal system enabled (max billing cycle 36 months).","type":"string"},"ProductName":{"description":"The name of the product for identifier used under ProductID.","type":"string"},"ProductQuantity":{"description":"Ordered quantity.","type":"number"}}}}}}
```

## DELETE /subscriptions/{SubscriptionReference}/

> Disable a subscription

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/":{"delete":{"tags":["Subscription"],"summary":"Disable a subscription","parameters":[{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}}}}}}}
```

## Revert subscription to pre-order state

> Reverts a subscription to its state before the specified order. The order must be the most recent one on the subscription and the subscription must not have been modified outside of an order since.

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/revert/":{"post":{"tags":["Subscription"],"summary":"Revert subscription to pre-order state","description":"Reverts a subscription to its state before the specified order. The order must be the most recent one on the subscription and the subscription must not have been modified outside of an order since.","parameters":[{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","default":"application/json","enum":["application/json"]}},{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["OrderReference","Reason"],"properties":{"OrderReference":{"type":"string","description":"The reference number (RefNo) of the order whose changes should be reverted. Must be the last order on the subscription."},"Reason":{"type":"string","description":"Mandatory free-text reason for the revert. Recorded in subscription history."}}}}}},"responses":{"200":{"description":"Subscription reverted successfully","content":{"application/json":{}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"inline_response_400":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}},"ErrorResponse":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Attach multiple additional information fields to a subscription

> Attach multiple additional information key/value pairs to an existing subscription in a single call

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/additionalInformations/":{"post":{"tags":["Subscription"],"summary":"Attach multiple additional information fields to a subscription","description":"Attach multiple additional information key/value pairs to an existing subscription in a single call","operationId":"addSubscriptionAdditionalInformationFields","parameters":[{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","enum":["application/json"]}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/body_18"}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}}}}}},"components":{"schemas":{"body_18":{"type":"object","properties":{"Name":{"description":"The name of the additional information field. Used for identifying additional information fields.","type":"string"},"Value":{"description":"The value of the additional information field.","type":"string"}}},"inline_response_400":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Retrieve information attached to a subscription

> Retrieve additional information of specified subscription

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/additionalinformation/":{"get":{"tags":["Subscription"],"summary":"Retrieve information attached to a subscription","description":"Retrieve additional information of specified subscription","parameters":[{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","default":"application/json","enum":["application/json"]}},{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}}}}}},"components":{"schemas":{"inline_response_400":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Attach additional information to a subscription

> Attach additional information to an existing subscription by key/value pair

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/additionalinformation/":{"post":{"tags":["Subscription"],"summary":"Attach additional information to a subscription","description":"Attach additional information to an existing subscription by key/value pair","parameters":[{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","enum":["application/json"]}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body_18"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}}}}}},"components":{"schemas":{"body_18":{"type":"object","properties":{"Name":{"description":"The name of the additional information field. Used for identifying additional information fields.","type":"string"},"Value":{"description":"The value of the additional information field.","type":"string"}}},"inline_response_400":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Retrieve information attached to a subscription by key

> Get additional information for a subscription by field key

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/additionalinformation/{Name}/":{"get":{"tags":["Subscription"],"summary":"Retrieve information attached to a subscription by key","description":"Get additional information for a subscription by field key","parameters":[{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","default":"application/json","enum":["application/json"]}},{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"Name","in":"path","description":"Unique name you assign as the identifier of an additional information field.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}}}}}},"components":{"schemas":{"inline_response_400":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Update additional information attached to a subscription by key

> Update additional information of a subscription by field/key

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/additionalinformation/{Name}/":{"put":{"tags":["Subscription"],"summary":"Update additional information attached to a subscription by key","description":"Update additional information of a subscription by field/key","parameters":[{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"Name","in":"path","description":"Unique name you assign as the identifier of an additional information field.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body_19"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}}}}}},"components":{"schemas":{"body_19":{"type":"object","properties":{"Name":{"description":"The name of the additional information field. Used for identifying additional information fields.","type":"string"},"Value":{"description":"The value you assign to the additional information field/","type":"string"}}},"inline_response_400":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Delete additional information of a subscription

> Remove additional information attached to a subscription by name/key

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/additionalinformation/{Name}/":{"delete":{"tags":["Subscription"],"summary":"Delete additional information of a subscription","description":"Remove additional information attached to a subscription by name/key","parameters":[{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"Name","in":"path","description":"Unique name you assign as the identifier of an additional information field.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}}}}}},"components":{"schemas":{"inline_response_400":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Attach PayPal to a subscription

> Build the PayPal URL that can be used to attach a subscription to a PayPal account.

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/paypal/attach/":{"post":{"tags":["Subscription"],"summary":"Attach PayPal to a subscription","description":"Build the PayPal URL that can be used to attach a subscription to a PayPal account.","parameters":[{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","default":"application/json","enum":["application/json"]}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier. Represents the subscription code that will be attached to the PayPal account.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body_26"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/subscriptionsSubscriptionReferencepaypal_response"}}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}}}}}},"components":{"schemas":{"body_26":{"type":"object","required":["paypalEmail","returnURL","cancelURL"],"properties":{"paypalEmail":{"type":"string","description":"The PayPal email associated with the subscription."},"returnURL":{"type":"string","description":"The URL the user will be redirected to if the subscription is successfully attached to PayPal."},"cancelURL":{"type":"string","description":"The URL the user will be redirected to if the subscription fails to attach to PayPal."}}},"subscriptionsSubscriptionReferencepaypal_response":{"type":"object","properties":{"status":{"type":"string","description":"Can be \"success\" if no errors occurred or \"error\" otherwise."},"url":{"type":"string","description":"The PayPal redirect URL if no errors occurred or empty otherwise."},"error":{"type":"array","description":"Empty if no errors occurred or the error message otherwise.","items":{"type":"string"}}}},"inline_response_400":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Retrieve a subscription’s customer

> Extract information on the customer associated with a specific subscription.

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/customer/":{"get":{"tags":["Subscription"],"summary":"Retrieve a subscription’s customer","description":"Extract information on the customer associated with a specific subscription.","parameters":[{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","default":"application/json","enum":["application/json"]}},{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}}}}}}}
```

## Assign a subscription to another customer

> Move a subscription from under a customer to another customer entity.

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/customer/":{"post":{"tags":["Subscription"],"summary":"Assign a subscription to another customer","description":"Move a subscription from under a customer to another customer entity.","parameters":[{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","enum":["application/json"]}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body_20"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"body_20":{"type":"object","properties":{"ExternalCustomerReference":{"description":"External customer reference that you control. Optional when you use AvangateCustomerReference. If you include it, it needs to belong to the same customer as the AvangateCustomerReference.","type":"string"},"AvangateCustomerReference":{"description":"System-generated customer reference. Required unless you prefer to use ExternalCustomerReference.","type":"integer"}}}}}}
```

## Retrieve a subscription's end user

> \*\*\*\
> \
> \*\*Overview\*\*\
> \
> Extract information about the end user of a specific subscription.

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/enduser/":{"get":{"tags":["Subscription"],"summary":"Retrieve a subscription's end user","description":"***\n\n**Overview**\n\nExtract information about the end user of a specific subscription.","parameters":[{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","default":"application/json","enum":["application/json"]}},{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUser"}}}}}}}},"components":{"schemas":{"EndUser":{"type":"object","properties":{"FirstName":{"type":"string"},"LastName":{"type":"string"},"Email":{"type":"string"},"Company":{"type":"string"},"FiscalCode":{"type":"string"},"Phone":{"type":"string"},"Fax":{"type":"string"},"Address1":{"type":"string"},"Address2":{"type":"string"},"Zip":{"type":"string"},"City":{"type":"string"},"State":{"type":"string"},"CountryCode":{"type":"string"},"Language":{"type":"string"}}}}}}
```

## Update end user info

> Update the end user details for a specific subscription.

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/enduser/":{"put":{"tags":["Subscription"],"summary":"Update end user info","description":"Update the end user details for a specific subscription.","parameters":[{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","enum":["application/json"]}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUser"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"EndUser":{"type":"object","properties":{"FirstName":{"type":"string"},"LastName":{"type":"string"},"Email":{"type":"string"},"Company":{"type":"string"},"FiscalCode":{"type":"string"},"Phone":{"type":"string"},"Fax":{"type":"string"},"Address1":{"type":"string"},"Address2":{"type":"string"},"Zip":{"type":"string"},"City":{"type":"string"},"State":{"type":"string"},"CountryCode":{"type":"string"},"Language":{"type":"string"}}}}}}
```

## Retrieve the payment info for a subscription

> Retrieve the payment information associated with a subscription and that the 2Checkout system uses for the auto-renewal process (recurring billing).

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/payment/":{"get":{"tags":["Subscription"],"summary":"Retrieve the payment info for a subscription","description":"Retrieve the payment information associated with a subscription and that the 2Checkout system uses for the auto-renewal process (recurring billing).","parameters":[{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","default":"application/json","enum":["application/json"]}},{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_200_9"}}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}}}}}},"components":{"schemas":{"inline_response_200_9":{"properties":{"Type":{"type":"string"},"Currency":{"type":"string"},"PaymentMethod":{"$ref":"#/components/schemas/inline_response_200_9_PaymentMethod"}}},"inline_response_200_9_PaymentMethod":{"type":"object","properties":{"FirstDigits":{"type":"string"},"LastDigits":{"type":"string"},"CardType":{"type":"string"},"ExpirationMonth":{"type":"string"},"ExpirationYear":{"type":"integer"},"CardUpdated":{"type":"boolean"},"Authorize3DSUrl":{"type":"string"}}},"inline_response_400":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Copy payment info

> Copy card-on-file data available in the 2Checkout system from a source subscription to an imported target subscription. 2Checkout uses the existing payment information to charge customers as a part of the recurring billing (renewal) process.

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/payment/":{"post":{"tags":["Subscription"],"summary":"Copy payment info","description":"Copy card-on-file data available in the 2Checkout system from a source subscription to an imported target subscription. 2Checkout uses the existing payment information to charge customers as a part of the recurring billing (renewal) process.","parameters":[{"name":"SubscriptionReference","in":"path","description":"The 2Checkout Subscription Reference of the imported target subscription, to which 2Checkout copies the payment on file data associated with the source","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"SubscriptionCode","in":"query","description":"The 2Checkout Subscription Reference of the source subscription whose attached payment on file data 2Checkout copies to the target subscription.","required":true,"style":"form","explode":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Boolean 'true' in case of successful copy"},"400":{"description":"Copy payment failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"ErrorResponse":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Update the payment info for a subscription

> Update the payment information associated with a subscription, the 2Checkout system uses for the auto-renewal process (recurring billing).

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/payment/":{"put":{"tags":["Subscription"],"summary":"Update the payment info for a subscription","description":"Update the payment information associated with a subscription, the 2Checkout system uses for the auto-renewal process (recurring billing).","parameters":[{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","default":"application/json","enum":["application/json"]}},{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLicensePaymentInformationPayload"}}}},"responses":{"200":{"description":"Return object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_200_9_PaymentMethod"}}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}},"403":{"description":"Operations forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}}}}}},"components":{"schemas":{"UpdateLicensePaymentInformationPayload":{"type":"object","properties":{"PaymentDetails":{"$ref":"#/components/schemas/UpdateLicensePaymentInformationPaymentDetails"}}},"UpdateLicensePaymentInformationPaymentDetails":{"type":"object","properties":{"Type":{"description":"The payment details type. Restricted to EES_TOKEN_PAYMENT for now.","type":"string"},"PaymentMethod":{"$ref":"#/components/schemas/UpdateLicensePaymentInformationPaymentMethod"}}},"UpdateLicensePaymentInformationPaymentMethod":{"type":"object","properties":{"EesToken":{"description":"The 2Pay token obtained by integrating the 2Pay.js library.","type":"string"},"Vendor3DSReturnURL":{"description":"URL address to which customers are redirected after the 3DS details get validated by the bank and the order is successfully authorized.","type":"string"},"Vendor3DSCancelURL":{"description":"URL address to which customers are redirected after the 3DS details get validated by the bank and the order is successfully authorized.","type":"string"}}},"inline_response_200_9_PaymentMethod":{"type":"object","properties":{"FirstDigits":{"type":"string"},"LastDigits":{"type":"string"},"CardType":{"type":"string"},"ExpirationMonth":{"type":"string"},"ExpirationYear":{"type":"integer"},"CardUpdated":{"type":"boolean"},"Authorize3DSUrl":{"type":"string"}}},"inline_response_400":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Retrieve renewal links and recurring billing status

> Retrieve the manual renewal link and the recurring billing status for a subscription.

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/renewal/":{"get":{"tags":["Subscription"],"summary":"Retrieve renewal links and recurring billing status","description":"Retrieve the manual renewal link and the recurring billing status for a subscription.","parameters":[{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","default":"application/json","enum":["application/json"]}},{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}}}}}},"components":{"schemas":{"inline_response_400":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Enable recurring billing for a subscription

> Enable recurring billing (the auto-renewal system) for a subscription.

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/renewal/":{"post":{"tags":["Subscription"],"summary":"Enable recurring billing for a subscription","description":"Enable recurring billing (the auto-renewal system) for a subscription.","parameters":[{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","enum":["application/json"]}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}}}}}},"components":{"schemas":{"inline_response_400":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Renew a subscription

> Renew a specific subscription controlling the price and number of days.

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/renewal/":{"put":{"tags":["Subscription"],"summary":"Renew a subscription","description":"Renew a specific subscription controlling the price and number of days.","parameters":[{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","enum":["application/json"]}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body_21"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}}}}}},"components":{"schemas":{"body_21":{"type":"object","properties":{"Currency":{"description":"The currency associated to the renewal price - ISO 4217 code.","type":"string"},"Days":{"description":"The number of days the 2Checkout system extends the lifetime of the subscription.","type":"number"},"ExtendSubscription":{"description":"Any or null.","nullable":true},"Price":{"description":"The price that 2Checkout charges the customer for the renewal. The type of price, Gross or Net, is decided by the product setting in the Merchant Control Panel.","type":"number"}}},"inline_response_400":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Disable recurring billing for a subscription

> Disable recurring billing (the auto-renewal system) for a subscription.

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/renewal/":{"delete":{"tags":["Subscription"],"summary":"Disable recurring billing for a subscription","description":"Disable recurring billing (the auto-renewal system) for a subscription.","parameters":[{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}}}}}},"components":{"schemas":{"inline_response_400":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Set a custom grace period

> Set a custom grace period for an \<strong>Active\</strong> or \<strong>Past Due\</strong> subscription.\
> \
> Use \*\*null\*\* to set the grace period for a subscription to the default value you defined in the per-product or per-account settings.\
> \
> \*\*\*\
> \
> \| Attributes            | Type/Description                                  |\
> \|-----------------------|---------------------------------------------------|\
> \| \*\*SubscriptionReference\*\* | \*\*Required (string)\*\*                                 |\
> \|                       | Unique, system-generated subscription identifier. |\
> \
> \*\*Query parameters\*\*\
> \
> \<table>\<thead>\
> \<tr>\
> \<th>\
> Attributes\
> \</th>\
> \<th>\
> Type/Description\
> \</th>\
> \</tr>\
> \</thead>\
> \<tbody>\
> \<tr>\
> \<td>\
> \<strong>Days\</strong>\
> \</td>\
> \<td>\
> \<strong>Required (string)\</strong>\
> \</td>\
> \</tr>\
> \<tr>\
> \<td >\
> \&nbsp;\
> \</td>\
> \<td>\
> The number of days of the grace period.\
> Use null to set the grace period for a subscription to the default value you defined in the per-product or per-account settings.\
> \</td>\
> \</tr>\
> \</tbody>\
> \</table>\
> \
> \*\*\*

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/renewal/graceperiod/":{"put":{"tags":["Subscription"],"summary":"Set a custom grace period","description":"Set a custom grace period for an <strong>Active</strong> or <strong>Past Due</strong> subscription.\n\nUse **null** to set the grace period for a subscription to the default value you defined in the per-product or per-account settings.\n\n***\n\n| Attributes            | Type/Description                                  |\n|-----------------------|---------------------------------------------------|\n| **SubscriptionReference** | **Required (string)**                                 |\n|                       | Unique, system-generated subscription identifier. |\n\n**Query parameters**\n\n<table><thead>\n<tr>\n<th>\nAttributes\n</th>\n<th>\nType/Description\n</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>\n<strong>Days</strong>\n</td>\n<td>\n<strong>Required (string)</strong>\n</td>\n</tr>\n<tr>\n<td >\n&nbsp;\n</td>\n<td>\nThe number of days of the grace period.\nUse null to set the grace period for a subscription to the default value you defined in the per-product or per-account settings.\n</td>\n</tr>\n</tbody>\n</table>\n\n***","parameters":[{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","enum":["application/json"]}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"Days","in":"query","description":"The number of days of the grace period.","required":true,"style":"form","explode":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}}}}}}}
```

## Enable renewal notification

> Subscribe shoppers to subscription renewal notifications.

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/renewal/notification/":{"post":{"tags":["Subscription"],"summary":"Enable renewal notification","description":"Subscribe shoppers to subscription renewal notifications.","parameters":[{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","enum":["application/json"]}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}}}}}}}
```

## Disable renewal notification

> Disable subscription renewal notifications for a specific subscription.

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/renewal/notification/":{"delete":{"tags":["Subscription"],"summary":"Disable renewal notification","description":"Disable subscription renewal notifications for a specific subscription.","parameters":[{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"ChurnReasons","in":"query","description":"Array of churn reason codes","required":false,"explode":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"ChurnReasonOther","in":"query","description":"Churn reason free text. Valid only if churn reason codes are CHURN_REASON_EXTRAORDINARY or CHURN_REASON_OTHER","required":false,"explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}}}}}}}
```

## Set merchant deal autorenewal value to true

> A merchant can change the merchantdealautorenewal to true on a client existing subscription

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/renewal/merchantdealautorenewal/":{"post":{"tags":["Subscription"],"summary":"Set merchant deal autorenewal value to true","description":"A merchant can change the merchantdealautorenewal to true on a client existing subscription","parameters":[{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","enum":["application/json"]}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetMerchantDealAutoRenewalResponse"}}}}}}}},"components":{"schemas":{"SetMerchantDealAutoRenewalResponse":{"type":"object","properties":{"MerchantDealAutoRenewal":{"type":"boolean"}}}}}}
```

## Set merchant deal autorenewal value to false

> A merchant can change the merchantdealautorenewal to false on a client existing subscription

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/renewal/merchantdealautorenewal/":{"delete":{"tags":["Subscription"],"summary":"Set merchant deal autorenewal value to false","description":"A merchant can change the merchantdealautorenewal to false on a client existing subscription","parameters":[{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetMerchantDealAutoRenewalResponse"}}}}}}}},"components":{"schemas":{"SetMerchantDealAutoRenewalResponse":{"type":"object","properties":{"MerchantDealAutoRenewal":{"type":"boolean"}}}}}}
```

## Set client deal autorenewal value to true

> If  merchant deal autorenewal is false then will set client deal autorenewal value to true

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/renewal/clientdealautorenewal/":{"post":{"tags":["Subscription"],"summary":"Set client deal autorenewal value to true","description":"If  merchant deal autorenewal is false then will set client deal autorenewal value to true","parameters":[{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","enum":["application/json"]}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetClientDealAutoRenewalResponse"}}}}}}}},"components":{"schemas":{"SetClientDealAutoRenewalResponse":{"type":"object","properties":{"ClientDealAutoRenewal":{"type":"boolean"}}}}}}
```

## Set client deal autorenewal value to false

> If  merchant deal autorenewal is false then will set client deal autorenewal value to false

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/renewal/clientdealautorenewal/":{"delete":{"tags":["Subscription"],"summary":"Set client deal autorenewal value to false","description":"If  merchant deal autorenewal is false then will set client deal autorenewal value to false","parameters":[{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetClientDealAutoRenewalResponse"}}}}}}}},"components":{"schemas":{"SetClientDealAutoRenewalResponse":{"type":"object","properties":{"ClientDealAutoRenewal":{"type":"boolean"}}}}}}
```

## Retrieve a subscription's next renewal price

> Retrieve pricing details for the next charge necessary to renew a specific subscription.

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/renewal/price/{Currency}/":{"get":{"tags":["Subscription"],"summary":"Retrieve a subscription's next renewal price","description":"Retrieve pricing details for the next charge necessary to renew a specific subscription.","parameters":[{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","default":"application/json","enum":["application/json"]}},{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"Currency","in":"path","description":"The currency ISO code used for the payment - ISO 4217.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}}}}}},"components":{"schemas":{"inline_response_400":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Set a custom subscription renewal price

> Set custom renewal prices for subscriptions and control the number of recurring billing cycles the price impact subscribers.

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/renewal/price/{Currency}/":{"put":{"tags":["Subscription"],"summary":"Set a custom subscription renewal price","description":"Set custom renewal prices for subscriptions and control the number of recurring billing cycles the price impact subscribers.","parameters":[{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","enum":["application/json"]}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"Currency","in":"path","description":"The currency ISO code used for the payment - ISO 4217.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body_22"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}}}}}},"components":{"schemas":{"body_22":{"type":"object","properties":{"Cycles":{"description":"Number of recurring billing cycles for which 2Checkout charges customers the custom price rather, ignoring product–level recurring pricing configurations. (The renewal cycles number must be a positive integer. Default value 1).","type":"number"},"Currency":{"description":"Currency in which prices are expressed. The currency ISO code used for the payment is ISO 4217. The default currency is the same as in the previous payment made by the customer.","type":"string"},"Price":{"description":"The custom renewal price you want to charge.","type":"number"},"Text":{"description":"Save details at the subscription-level about the custom costs.","type":"string"}}},"inline_response_400":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Convert a trial

> Convert a trial to a paid subscription. In the eventuality of a conversion failure, you can attempt the same trial subscription conversion only after you let 24 hours pass since the initial attempt. The 2Checkout system also attempts to automatically convert trials before they expire to full subscriptions, unless you made an attempt that failed less than 24 hours before the scheduled expiration deadline.\
> In case the trial conversion fails due to a transaction issue, the 2Checkout system sends unfinished payment follow-up emails to customers, provided that you set up lead management for your account.

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/renewal/trial/":{"put":{"tags":["Subscription"],"summary":"Convert a trial","description":"Convert a trial to a paid subscription. In the eventuality of a conversion failure, you can attempt the same trial subscription conversion only after you let 24 hours pass since the initial attempt. The 2Checkout system also attempts to automatically convert trials before they expire to full subscriptions, unless you made an attempt that failed less than 24 hours before the scheduled expiration deadline.\nIn case the trial conversion fails due to a transaction issue, the 2Checkout system sends unfinished payment follow-up emails to customers, provided that you set up lead management for your account.","parameters":[{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","enum":["application/json"]}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier belonging to a trial for which 2Checkout collected payment information (card).","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"Currency","in":"query","description":"The currency associated to the renewal price - ISO 4217 code.","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"Days","in":"query","description":"The number of days the 2Checkout system extends the lifetime of the subscription.","required":false,"style":"form","explode":true,"schema":{"type":"integer"}},{"name":"ExtendSubscription","in":"query","description":"true - Subscription start date is the moment of the conversion. false - Subscription start date is the trial/subscription expiration date.","required":false,"style":"form","explode":true,"schema":{"type":"boolean"}},{"name":"Price","in":"query","description":"true - The price that 2Checkout charges the customer for the renewal. This is the Netprice. Ignored for trial conversions.","required":false,"style":"form","explode":true,"schema":{"type":"number"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}}}}}}}
```

## Retrieve a subscription's pause information

> Retrieve a subscription's pause information

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/renewal/pause/":{"get":{"tags":["Subscription"],"summary":"Retrieve a subscription's pause information","description":"Retrieve a subscription's pause information","parameters":[{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","default":"application/json","enum":["application/json"]}},{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}}}}}},"components":{"schemas":{"inline_response_400":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Pause subscription

> Pause a subscription

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/renewal/pause/":{"post":{"tags":["Subscription"],"summary":"Pause subscription","description":"Pause a subscription","parameters":[{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","enum":["application/json"]}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"ResumeDate","in":"query","description":"Resume date","required":true,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"PauseReason","in":"query","description":"Pause reason","required":false,"style":"form","explode":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}}}}}},"components":{"schemas":{"inline_response_400":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Unpause subscription

> Unpause a subscription

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/renewal/pause/":{"delete":{"tags":["Subscription"],"summary":"Unpause subscription","description":"Unpause a subscription","parameters":[{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}}}}}},"components":{"schemas":{"inline_response_400":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Trigger immediate billing for a pay per usage subscription

> This method will schedule the subscription to auto-renew as soon as possible.

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/renewal/usage/":{"put":{"tags":["Subscription"],"summary":"Trigger immediate billing for a pay per usage subscription","description":"This method will schedule the subscription to auto-renew as soon as possible.","parameters":[{"in":"path","schema":{"type":"string"},"name":"SubscriptionReference","description":"Unique code which represents a subscription","required":true}],"responses":{"200":{"description":"No content"},"400":{"description":"Immediate usage billing client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}},"500":{"description":"Immediate usage billing server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}}}}}},"components":{"schemas":{"inline_response_400":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Retrieve upgrade options for a subscription

> Retrieve the upgrade options available for a specific subscription.

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/upgrade/":{"get":{"tags":["Subscription"],"summary":"Retrieve upgrade options for a subscription","description":"Retrieve the upgrade options available for a specific subscription.","parameters":[{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","default":"application/json","enum":["application/json"]}},{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"Currency","in":"query","description":"Optional 3-letter ISO 4217 currency code to return upgrade option prices in, instead of the product's default currency (e.g. RON).\n\nIf the product has prices set up in the requested currency, those prices are returned as-is. Otherwise, prices are converted from the product's default currency. Returns an error if the value provided is not a valid currency.","required":false,"style":"form","explode":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"400":{"description":"Bad request - invalid currency","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"ErrorResponse":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Upgrade a subscription

> Upgrade a specific subscription.

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/upgrade/":{"put":{"tags":["Subscription"],"summary":"Upgrade a subscription","description":"Upgrade a specific subscription.","parameters":[{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","enum":["application/json"]}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body_23"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{}}},"400":{"description":"Upgrade validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"body_23":{"type":"object","properties":{"CustomPrice":{"description":"The price you want to charge customers for the upgrade. The currency used by default is the same as in the previous payment customers made.","type":"number"},"ExternalRef":{"description":"External reference you control.","nullable":true},"PriceOptions":{"description":"Pricing options of the target product for the subscription upgrade process.","type":"string"},"ProductCode":{"description":"Unique identifier of the target product for the subscription upgrade process. You control the product code and can set it up in the Control Panel.","type":"string"},"Quantity":{"description":"Quantity of the product.","type":"number"}}},"ErrorResponse":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Retrieve product upgrade price for a subscription

> Retrieve the upgrade price available for a specific subscription. The response will contain the upgrade price for quantity = 1.

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/upgrade/price/{ProductReference}/{CurrencyCode}/":{"get":{"tags":["Subscription"],"summary":"Retrieve product upgrade price for a subscription","description":"Retrieve the upgrade price available for a specific subscription. The response will contain the upgrade price for quantity = 1.","parameters":[{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","default":"application/json","enum":["application/json"]}},{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"ProductReference","in":"path","description":"Unique, system-generated product identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"CurrencyCode","in":"path","description":"Currency code.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"Options","in":"query","description":"Price options delimited by comma.","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"Quantity","in":"query","description":"Quantity.","required":false,"style":"form","explode":true,"schema":{"type":"integer"}},{"name":"CalculateProratedPrice","in":"query","description":"Decides if the price should be prorated.","required":false,"style":"form","explode":true,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}}}}}}}
```

## Schedule product update

> Schedule a product update for a subscription. The update will be applied at the next renewal.

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/schedule-product-update":{"post":{"tags":["Subscription"],"summary":"Schedule product update","description":"Schedule a product update for a subscription. The update will be applied at the next renewal.","parameters":[{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","default":"application/json","enum":["application/json"]}},{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["ProductCode","PricingOptions"],"properties":{"ProductCode":{"type":"string","description":"The product code to update to"},"PricingOptions":{"type":"string","description":"Semicolon-separated list of pricing options"},"Quantity":{"type":"integer","description":"Optional quantity for the product"}}}}}},"responses":{"200":{"description":"Product update scheduled successfully","content":{"application/json":{}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"inline_response_400":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}},"ErrorResponse":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Remove scheduled product update

> Remove a previously scheduled product update for a subscription.

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/remove-scheduled-product-update":{"delete":{"tags":["Subscription"],"summary":"Remove scheduled product update","description":"Remove a previously scheduled product update for a subscription.","parameters":[{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","default":"application/json","enum":["application/json"]}},{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Scheduled product update removed successfully","content":{"application/json":{}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"inline_response_400":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}},"ErrorResponse":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.2checkout.com/api-reference/reference/subscription.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
