# Churn prevention campaigns

## Retrieve churn prevention campaigns for a subscription

> Retrieve the list of eligible campaigns 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}/churn-campaigns/eligible/{Language}":{"get":{"tags":["Churn prevention campaigns"],"summary":"Retrieve churn prevention campaigns for a subscription","description":"Retrieve the list of eligible campaigns 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":"Language","in":"path","description":"The language abbreviation in which messages are translated","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetEligibleCampaignsResponse"}}}},"400":{"description":"Invalid subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}},"404":{"description":"Invalid language","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}}}}}},"components":{"schemas":{"GetEligibleCampaignsResponse":{"type":"object","properties":{"AvailableCancellationReasons":{"type":"object","additionalProperties":{"type":"string"}},"Campaigns":{"type":"array","items":{"type":"object","properties":{"Code":{"type":"string"},"Name":{"type":"string"},"DefaultMessage":{"type":"string"},"CancellationReasonRequired":{"type":"boolean"},"OfferPause":{"type":"boolean"},"OfferDiscount":{"type":"object","nullable":true,"properties":{"Message":{"type":"string"},"Discount":{"type":"number","format":"double"},"BillingCycles":{"type":"integer"}}}}}}}},"inline_response_400":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Accept churn campaign for a subscription

> Accept discount from a churn prevention campaign 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}/churn-campaigns/{CampaignCode}/accept-discount":{"post":{"tags":["Churn prevention campaigns"],"summary":"Accept churn campaign for a subscription","description":"Accept discount from a churn prevention campaign 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"}},{"name":"CampaignCode","in":"path","description":"Unique, system-generated campaign identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"400":{"description":"Invalid subscription","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"}}}}}}
```

## Enter churn campaign

> Mark auto renewal cancellation intent 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}/churn-campaigns/{CampaignCode}/enter":{"post":{"tags":["Churn prevention campaigns"],"summary":"Enter churn campaign","description":"Mark auto renewal cancellation intent 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"}},{"name":"CampaignCode","in":"path","description":"Unique, system-generated campaign identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterCampaignStep"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{}}},"400":{"description":"Invalid campaign","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}}}}}},"components":{"schemas":{"EnterCampaignStep":{"type":"object","required":["Step","Success","Reason"],"properties":{"Step":{"type":"string"},"Success":{"type":"integer"},"Reason":{"type":"string"},"Comment":{"type":"string"}}},"inline_response_400":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```


---

# 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/churn-prevention-campaigns.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.
