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

Subscription

Search subscriptions

get
Query parameters
CustomerEmailstringOptional

Customer's email

Example: customer@2checkout.com
DeliveredCodestringOptional

Customer's delivered code

Example: FJD89SR
AvangateCustomerReferencestringOptional

Customer's reference

Example: FDOIEJF
ExternalCustomerReferencestringOptional

Customer's external reference

Example: 4584358
AggregatebooleanOptional

Aggregated data, the only valid value is 'true'

Example: true
SubscriptionEnabledbooleanOptional

Checks status

Example: false
RecurringEnabledbooleanOptional

Filter by recurring status

Example: true
ProductCodesstring[]Optional

Array of product codes

Example: ["FJGHRE","GFDFOI"]
CountryCodesstring[]Optional

Array of countries codes

Example: ["UK","BG","RO","FR"]
PurchasedAfterstringOptional

Purchase date

Example: 2018-09-03
PurchasedBeforestringOptional

Purchase date

Example: 2018-09-03
ExpireAfterstringOptional

Expire date

Example: 2018-09-03
ExpireBeforestringOptional

Expire date

Example: 2018-09-03
RenewedAfterstringOptional

Renew date

Example: 2018-09-03
RenewedBeforestringOptional

Renew date

Example: 2018-09-03
NotificationAfterstringOptional

Notification date

Example: 2018-09-03
NotificationBeforestringOptional

Notification date

Example: 2018-09-03
ModifiedAfterstringOptional

Change date

Example: 2018-09-03
ModifiedBeforestringOptional

Change date

Example: 2018-09-03
NextBillingDateAfterstringOptional

Start date of Next billing date filter

Example: 2018-09-03
NextBillingDateBeforestringOptional

End date of Next billing date filter

Example: 2018-09-03
LifetimeSubscriptionbooleanOptional

Filter by lifetime subscriptions

Example: false
TypestringOptional

Subscription types

Example: REGULAR
PageintegerOptional

Requested page

Example: 2
LimitintegerOptional

Limit number

Example: 20
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

List subscriptions

application/json
get
/subscriptions/
200

List subscriptions

Import test subscriptions with card information

post
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Body
AdditionalInfoany · nullableOptional
CustomPriceBillingCyclesLeftnumberOptional
ExpirationDatestringOptional
ExternalCustomerReferenceany · nullableOptional
ExternalSubscriptionReferencestringOptional
NextRenewalPricenumberOptional
NextRenewalPriceCurrencystringOptional
PartnerCodestringOptional
StartDatestringOptional
ActivationDatestring · nullableOptional
SubscriptionValuenumberOptional
SubscriptionValueCurrencystringOptional
TestnumberOptional
Responses
post
/subscriptions/
201

Overview

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


Requirements

Test subscriptions can be imported only for eStore orders. Only dummy credit card data can be assigned to subscriptions. Check here the list of credit cards that can be used for import.

Cardholder name is composed as FirstName + " " + LastName.

Retrieve a subscription

get
Path parameters
SubscriptionReferencestringRequired

Unique code which represents a subscription

Example: D183B94D0E
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

Get subscription

application/json
SubscriptionReferencestringOptionalExample: 3501E8CADA
StartDatestringOptionalExample: 2018-09-03 16:28:32
ActivationDatestringOptionalExample: 2018-09-03 16:28:32
ExpirationDatestringOptionalExample: 2018-09-03 17:28:32
RecurringEnabledbooleanOptionalExample: true
NextBillingDatestring · max: 25RequiredDefault: nullExample: 2020-11-09T12:19:31+02:00
SubscriptionEnabledbooleanOptionalExample: true
SKUstringOptional
ReceiveNotificationsbooleanOptionalExample: true
LifetimebooleanOptionalExample: false
PartnerCodestringOptionalExample: ADE86
ReasonTextstringOptionalExample: Imported
IdAffiliateintegerOptionalExample: 0
CustomerReferencestringOptionalExample: 918495269
ExternalCustomerReferencestringOptionalExample: 123980DUSI46
TestSubscriptionbooleanOptionalExample: false
IsTrialbooleanOptionalExample: false
StatusstringOptionalExample: EXPIRED
IsAssistedSalebooleanOptionalExample: false
get
/subscriptions/{SubscriptionReference}/
200

Get subscription

Enable a subscription

post
Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: D183B94D0E
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Responses
200

OK

application/json
stringOptional
post
/subscriptions/{SubscriptionReference}/
200

OK

Update a subscription

put
Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: AF168DD240
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Body
StartDatestringOptional
ExpirationDatestringOptional
ExternalCustomerReferenceany · nullableOptional
RecurringEnabledbooleanOptional
SubscriptionEnabledbooleanOptional
ChurnReasonsstring[]Optional
ChurnReasonOtherstringOptional
Responses
200

OK

application/json
stringOptional
put
/subscriptions/{SubscriptionReference}/
200

OK

Disable a subscription

delete
Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: D183B94D0E
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

OK

application/json
stringOptional
delete
/subscriptions/{SubscriptionReference}/
200

OK

Retrieve information attached to a subscription

get

Retrieve additional information of specified subscription

Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: 5A235DDE94
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

OK

application/json
get
/subscriptions/{SubscriptionReference}/additionalinformation/

Attach additional information to a subscription

post

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

Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: 5A235DDE94
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Body
NamestringOptional
ValuestringOptional
Responses
200

OK

application/json
post
/subscriptions/{SubscriptionReference}/additionalinformation/

Retrieve information attached to a subscription by key

get

Get additional information for a subscription by field key

Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: 5A235DDE94
NamestringRequired

Unique name you assign as the identifier of an additional information field.

Example: TestField1
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

OK

application/json
get
/subscriptions/{SubscriptionReference}/additionalinformation/{Name}/

Update additional information attached to a subscription by key

put

Update additional information of a subscription by field/key

Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: 5A235DDE94
NamestringRequired

Unique name you assign as the identifier of an additional information field.

Example: TestField1
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
AcceptstringRequiredExample: application/json
Body
NamestringOptional
ValuestringOptional
Responses
200

OK

application/json
put
/subscriptions/{SubscriptionReference}/additionalinformation/{Name}/

Delete additional information of a subscription

delete

Remove additional information attached to a subscription by name/key

Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: 5A235DDE94
NamestringRequired

Unique name you assign as the identifier of an additional information field.

Example: TestField1
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

OK

application/json
delete
/subscriptions/{SubscriptionReference}/additionalinformation/{Name}/

Retrieve a subscription’s customer

get

Extract information on the customer associated with a specific subscription.

Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: 5A235DDE94
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

OK

application/json
get
/subscriptions/{SubscriptionReference}/customer/
200

OK

Assign a subscription to another customer

post

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

Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: AF168DD240
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Body
ExternalCustomerReferencestringOptional
AvangateCustomerReferenceintegerOptional
Responses
200

OK

application/json
stringOptionalExample: true
post
/subscriptions/{SubscriptionReference}/customer/
200

OK

Retrieve a subscription's end user

get

Overview

Extract information about the end user of a specific subscription.

Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: 13E4ED768D
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

OK

application/json
FirstNamestringOptionalExample: John
LastNamestringOptionalExample: Doe
EmailstringOptionalExample: dynamicproduct@products.com
CompanystringOptional
FiscalCodestringOptionalExample: A54FR
PhonestringOptional
FaxstringOptional
Address1stringOptionalExample: Address example
Address2stringOptional
ZipstringOptionalExample: 90210
CitystringOptionalExample: LA
StatestringOptionalExample: California
CountryCodestringOptionalExample: us
LanguagestringOptionalExample: en
get
/subscriptions/{SubscriptionReference}/enduser/
200

OK

Update end user info

put

Update the end user details for a specific subscription.

Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: 13E4ED768D
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Body
FirstNamestringOptionalExample: John
LastNamestringOptionalExample: Doe
EmailstringOptionalExample: dynamicproduct@products.com
CompanystringOptional
FiscalCodestringOptionalExample: A54FR
PhonestringOptional
FaxstringOptional
Address1stringOptionalExample: Address example
Address2stringOptional
ZipstringOptionalExample: 90210
CitystringOptionalExample: LA
StatestringOptionalExample: California
CountryCodestringOptionalExample: us
LanguagestringOptionalExample: en
Responses
200

OK

application/json
stringOptionalExample: true
put
/subscriptions/{SubscriptionReference}/enduser/
200

OK

Retrieve the payment info for a subscription

get

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

Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: 13E4ED768D
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

OK

application/json
TypestringOptionalExample: TEST
CurrencystringOptionalExample: USD
get
/subscriptions/{SubscriptionReference}/payment/

Copy payment info

post

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.

Path parameters
SubscriptionReferencestringRequired

The 2Checkout Subscription Reference of the imported target subscription, to which 2Checkout copies the payment on file data associated with the source

Example: 9366C227E7
Query parameters
SubscriptionCodestringRequired

The 2Checkout Subscription Reference of the source subscription whose attached payment on file data 2Checkout copies to the target subscription.

Example: AD45C256Q1
Responses
200

Boolean 'true' in case of successful copy

No content

post
/subscriptions/{SubscriptionReference}/payment/

No content

Update the payment info for a subscription

put

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

Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: 13E4ED768D
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Body
Responses
200

Return object

application/json
FirstDigitsstringOptionalExample: 4111
LastDigitsstringOptionalExample: 1111
CardTypestringOptionalExample: visa
ExpirationMonthstringOptionalExample: 02
ExpirationYearintegerOptionalExample: 2023
CardUpdatedbooleanOptionalExample: true
Authorize3DSUrlstringOptionalExample: http://secure.avangate.local/order/3ds.php?refno=11656222&CHANGE_CARD=1
put
/subscriptions/{SubscriptionReference}/payment/

Retrieve renewal links and recurring billing status

get

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

Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: 13E4ED768D
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

OK

application/json
get
/subscriptions/{SubscriptionReference}/renewal/

Enable recurring billing for a subscription

post

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

Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: 13E4ED768D
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Responses
200

OK

application/json
post
/subscriptions/{SubscriptionReference}/renewal/

Renew a subscription

put

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

Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: 13E4ED768D
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Body
CurrencystringOptional
DaysnumberOptional
ExtendSubscriptionany · nullableOptional
PricenumberOptional
Responses
200

OK

application/json
put
/subscriptions/{SubscriptionReference}/renewal/

Disable recurring billing for a subscription

delete

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

Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: 13E4ED768D
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

OK

application/json
delete
/subscriptions/{SubscriptionReference}/renewal/

Set a custom grace period

put

Set a custom grace period for an Active or Past Due 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

Attributes
Type/Description

Days

Required (string)

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.


Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: 48F5AC7011
Query parameters
DaysintegerRequired

The number of days of the grace period.

Example: 7
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Responses
200

OK

application/json
put
/subscriptions/{SubscriptionReference}/renewal/graceperiod/
200

OK

Enable renewal notification

post

Subscribe shoppers to subscription renewal notifications.

Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: 13E4ED768D
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Responses
200

OK

application/json
post
/subscriptions/{SubscriptionReference}/renewal/notification/
200

OK

Disable renewal notification

delete

Disable subscription renewal notifications for a specific subscription.

Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: 13E4ED768D
Query parameters
ChurnReasonsstring[]Optional

Array of churn reason codes

Example: ["CHURN_REASON_NOT_SATISFIED_PRODUCT","CHURN_REASON_ENABLED_BY_MISTAKE","CHURN_REASON_PREFER_MANUAL","CHURN_REASON_ALREADY_RENEWED","CHURN_REASON_DONT_NEED","CHURN_REASON_WANT_PAUSE","CHURN_REASON_COVID","CHURN_REASON_HIGH_PRICE","CHURN_REASON_NOT_SATISFIED_SUPPORT","CHURN_REASON_EXTRAORDINARY","CHURN_REASON_OTHER"]
ChurnReasonOtherstringOptional

Churn reason free text. Valid only if churn reason codes are CHURN_REASON_EXTRAORDINARY or CHURN_REASON_OTHER

Example: An example reason in freetext
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

OK

application/json
delete
/subscriptions/{SubscriptionReference}/renewal/notification/
200

OK

Set merchant deal autorenewal value to true

post

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

Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: 13E4ED768D
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Responses
200

OK

application/json
MerchantDealAutoRenewalbooleanOptional
post
/subscriptions/{SubscriptionReference}/renewal/merchantdealautorenewal/
200

OK

Set merchant deal autorenewal value to false

delete

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

Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: 13E4ED768D
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

OK

application/json
MerchantDealAutoRenewalbooleanOptional
delete
/subscriptions/{SubscriptionReference}/renewal/merchantdealautorenewal/
200

OK

Set client deal autorenewal value to true

post

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

Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: 13E4ED768D
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Responses
200

OK

application/json
ClientDealAutoRenewalbooleanOptional
post
/subscriptions/{SubscriptionReference}/renewal/clientdealautorenewal/
200

OK

Set client deal autorenewal value to false

delete

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

Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: 13E4ED768D
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

OK

application/json
ClientDealAutoRenewalbooleanOptional
delete
/subscriptions/{SubscriptionReference}/renewal/clientdealautorenewal/
200

OK

Retrieve a subscription's next renewal price

get

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

Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: 48F5AC7011
CurrencystringRequired

The currency ISO code used for the payment - ISO 4217.

Example: usd
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

OK

application/json
get
/subscriptions/{SubscriptionReference}/renewal/price/{Currency}/

Set a custom subscription renewal price

put

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

Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: 48F5AC7011
CurrencystringRequired

The currency ISO code used for the payment - ISO 4217.

Example: usd
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Body
CyclesnumberOptional
CurrencystringOptional
PricenumberOptional
TextstringOptional
Responses
200

OK

application/json
put
/subscriptions/{SubscriptionReference}/renewal/price/{Currency}/

Convert a trial

put

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.

Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier belonging to a trial for which 2Checkout collected payment information (card).

Example: C941E05AF3
Query parameters
CurrencystringOptional

The currency associated to the renewal price - ISO 4217 code.

Example: usd
DaysintegerOptional

The number of days the 2Checkout system extends the lifetime of the subscription.

Example: 30
ExtendSubscriptionbooleanOptional

true - Subscription start date is the moment of the conversion. false - Subscription start date is the trial/subscription expiration date.

Example: false
PricenumberOptional

true - The price that 2Checkout charges the customer for the renewal. This is the Netprice. Ignored for trial conversions.

Example: 45.99
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Responses
200

OK

application/json
put
/subscriptions/{SubscriptionReference}/renewal/trial/
200

OK

Retrieve a subscription's pause information

get

Retrieve a subscription's pause information

Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: 13E4ED768D
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

OK

application/json
get
/subscriptions/{SubscriptionReference}/renewal/pause/

Pause subscription

post

Pause a subscription

Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: 13E4ED768D
Query parameters
ResumeDatestringRequired

Resume date

Example: 2020-02-30 18:00:00
PauseReasonstringOptional

Pause reason

Example: vacation leave
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Responses
200

OK

application/json
post
/subscriptions/{SubscriptionReference}/renewal/pause/

Unpause subscription

delete

Unpause a subscription

Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: 13E4ED768D
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

OK

application/json
delete
/subscriptions/{SubscriptionReference}/renewal/pause/

Trigger immediate billing for a pay per usage subscription

put

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

Path parameters
SubscriptionReferencestringRequired

Unique code which represents a subscription

Responses
200

No content

No content

put
/subscriptions/{SubscriptionReference}/renewal/usage/

No content

Retrieve upgrade options for a subscription

get

Retrieve the upgrade options available for a specific subscription.

Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: 13E4ED768D
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

OK

application/json
get
/subscriptions/{SubscriptionReference}/upgrade/
200

OK

Upgrade a subscription

put

Upgrade a specific subscription.

Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: 13E4ED768D
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Body
CustomPricenumberOptional
ExternalRefany · nullableOptional
PriceOptionsstringOptional
ProductCodestringOptional
QuantitynumberOptional
Responses
200

OK

application/json
put
/subscriptions/{SubscriptionReference}/upgrade/

Retrieve product upgrade price for a subscription

get

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

Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: 13E4ED768D
ProductReferencestringRequired

Unique, system-generated product identifier.

Example: 76G4FE769L
CurrencyCodestringRequired

Currency code.

Example: EUR
Query parameters
OptionsstringOptional

Price options delimited by comma.

Example: abc,def
QuantityintegerOptional

Quantity.

Example: 4
CalculateProratedPricebooleanOptional

Decides if the price should be prorated.

Example: false
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

OK

application/json
get
/subscriptions/{SubscriptionReference}/upgrade/price/{ProductReference}/{CurrencyCode}/
200

OK

Schedule product update

post

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

Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: 13E4ED768D
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Body
ProductCodestringRequired

The product code to update to

Example: AIJT2PY5IG
PricingOptionsstringRequired

Semicolon-separated list of pricing options

Example: adb_checkbox_1;adb_radio_2
QuantityintegerOptional

Optional quantity for the product

Example: 2
Responses
200

Product update scheduled successfully

application/json
post
/subscriptions/{SubscriptionReference}/schedule-product-update

Remove scheduled product update

delete

Remove a previously scheduled product update for a subscription.

Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: 13E4ED768D
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

Scheduled product update removed successfully

application/json
delete
/subscriptions/{SubscriptionReference}/remove-scheduled-product-update

Last updated

Was this helpful?