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

Churn Prevention Campaigns

Retrieve churn prevention campaigns for a subscription

get

Retrieve the list of eligible campaigns for a specific subscription.

Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: 48F5AC7011
LanguagestringRequired

The language abbreviation in which messages are translated

Example: en
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

Successful response

application/json
get/subscriptions/{SubscriptionReference}/churn-campaigns/eligible/{Language}
GET /rest/6.0/subscriptions/{SubscriptionReference}/churn-campaigns/eligible/{Language} HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
{
  "AvailableCancellationReasons": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "Campaigns": [
    {
      "Code": "text",
      "Name": "text",
      "DefaultMessage": "text",
      "CancellationReasonRequired": true,
      "RestrictedToCatalogPrices": true,
      "OfferPause": true,
      "OfferDiscount": {
        "Message": "text",
        "Discount": 1,
        "DiscountType": "PERCENT",
        "BillingCycles": "text"
      }
    }
  ]
}

Accept churn campaign for a subscription

post

Accept discount from a churn prevention campaign for a specific subscription.

Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: 13E4ED768D
CampaignCodestringRequired

Unique, system-generated campaign identifier.

Example: IHMMYIAZULAZDHZGOLIY
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}/churn-campaigns/{CampaignCode}/accept-discount
POST /rest/6.0/subscriptions/{SubscriptionReference}/churn-campaigns/{CampaignCode}/accept-discount HTTP/1.1
Host: api.2checkout.com
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Accept: application/json
true

Enter churn campaign

post

Mark auto renewal cancellation intent for a specific subscription.

Path parameters
SubscriptionReferencestringRequired

Unique, system-generated subscription identifier.

Example: 351D8F557E
CampaignCodestringRequired

Unique, system-generated campaign identifier.

Example: UGPPKKJY5L1LHBFPHKQ3
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Body
StepstringRequiredExample: REASON
SuccessintegerRequiredExample: 0
ReasonstringRequiredExample: CHURN_REASON_NOT_SATISFIED
CommentstringOptionalExample: Not satisfied because …
Responses
200

OK

application/json
post/subscriptions/{SubscriptionReference}/churn-campaigns/{CampaignCode}/enter
POST /rest/6.0/subscriptions/{SubscriptionReference}/churn-campaigns/{CampaignCode}/enter HTTP/1.1
Host: api.2checkout.com
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Accept: application/json
Content-Type: application/json
Content-Length: 105

{
  "Step": "REASON",
  "Success": 0,
  "Reason": "CHURN_REASON_NOT_SATISFIED",
  "Comment": "Not satisfied because …"
}
true

Last updated

Was this helpful?