Subscription History
Overview
Retrieve information on the evolution of a subscription in the 2Checkout system, including details of the initial acquisition and the subsequent renewals and upgrades.
Subscriptions can be retrieved starting with 5 minutes after their orders are generated in the 2Checkout system.
Unique, system-generated subscription identifier.
48F5AC7011application/jsonExample: application/jsonPossible values: Authentication header
code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"OK
GET /rest/6.0/subscriptions/{SubscriptionReference}/history/ HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
OK
[
{
"DeliveryInfo": {
"Codes": [
{
"Codes": "___TEST___CODE____"
}
]
},
"ExpirationDate": "2015-03-12",
"Lifetime": false,
"PartnerCode": "",
"ReferenceNo": "1234567",
"SKU": "NewSubscriptionPurchase",
"StartDate": "2015-02-12",
"SubscriptionReference": "48F5AC7011",
"Type": "SALE"
},
{
"DeliveryInfo": {
"Codes": [
{
"Code": "___TEST___CODE____"
}
]
},
"ExpirationDate": "2015-04-11",
"Lifetime": false,
"PartnerCode": "",
"ReferenceNo": "112233445",
"SKU": "SubscriptionRenewal",
"StartDate": "2015-02-12",
"SubscriptionReference": "48F5AC7011",
"Type": "RENEWAL"
}
]Extends an existing subscription.
Unique, system-generated subscription identifier.
13E4ED768DThe number of days of delay.
7Authentication header
code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"application/jsonPossible values: OK
PUT /rest/6.0/subscriptions/{SubscriptionReference}/history/?Days=text HTTP/1.1
Host: api.2checkout.com
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Accept: application/json
OK
trueRetrieve a snapshot of a subscription’s evolution corresponding to a specific purchase for which you provide the order reference number.
Unique, system-generated subscription identifier.
48F5AC7011Reference number for approved/paid orders.
1234567application/jsonExample: application/jsonPossible values: Authentication header
code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"OK
GET /rest/6.0/subscriptions/{SubscriptionReference}/history/{OrderReference}/ HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
OK
{
"DeliveryInfo": {
"Codes": [
{
"Code": "___TEST___CODE____"
}
]
},
"ExpirationDate": "2015-03-12",
"Lifetime": false,
"PartnerCode": "",
"ReferenceNo": "1234567",
"SKU": "NewSubscriptionPurchase",
"StartDate": "2015-02-12",
"SubscriptionReference": "48F5AC7011",
"Type": "SALE"
}Last updated
Was this helpful?