# Subscription history

## Retrieve the history of a subscription

> \*\*\*\
> \
> \*\*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.

```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}/history/":{"get":{"tags":["Subscription history"],"summary":"Retrieve the history of a subscription","description":"***\n\n**Overview**\n\nRetrieve information on the evolution of a subscription in the 2Checkout system, including details of the initial acquisition and the subsequent renewals and upgrades.\n\nSubscriptions can be retrieved starting with 5 minutes after their orders are generated in the 2Checkout system.","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":{}}}}}}}}
```

## Extend a subscription

> Extends an 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}/history/":{"put":{"tags":["Subscription history"],"summary":"Extend a subscription","description":"Extends an 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"}},{"name":"Days","in":"query","description":"The number of days of delay.","required":true,"style":"form","explode":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}}}}}}}
```

## Retrieve a subscription's purchase, renewal or upgrade details

> Retrieve a snapshot of a subscription’s evolution corresponding to a specific purchase for which you provide the order reference number.

```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}/history/{OrderReference}/":{"get":{"tags":["Subscription history"],"summary":"Retrieve a subscription's purchase, renewal or upgrade details","description":"Retrieve a snapshot of a subscription’s evolution corresponding to a specific purchase for which you provide the order reference number.","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":"OrderReference","in":"path","description":"Reference number for approved/paid orders.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}}}}}}}
```


---

# Agent Instructions: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
