Core Resources
Retention strategiesNew
A
Retention strategy is a cancellation reason a customer can choose when cancelling, together with the message and optional incentive (a discount, skipping a charge, delaying the subscription or swapping the product) offered to keep them subscribed.This resource is new in the V2 reference. It also works when you send X-Recharge-Version: 2021-11.
#The retention strategy object
Attributes
- idintegerUnique numeric identifier for the
Retention strategy. - cancellation_flow_typestringThe kind of cancellation the
Retention strategyis offered for.Possible valuessubscriptionmembership - reasonstringThe cancellation reason shown to the customer.
- prevention_textstring · nullableThe message shown to the customer after selecting the cancellation reason, to encourage them not to cancel.
- incentive_typestring · nullableThe incentive offered to the customer to prevent the cancellation.
nullwhen no incentive is offered.Possible valuesdiscountskip_chargedelay_subscriptionswap_product - discount_codestring · nullableThe code of the
Discountoffered to the customer. Only set whenincentive_typeisdiscount. - originstring · nullableSet to
active_churn_flowwhen theRetention strategybelongs to a cancellation flow; otherwisenull.Possible valuesactive_churn_flow - created_atdatetimeThe date and time when the
Retention strategywas created. - updated_atdatetimeThe date and time when the
Retention strategywas last updated. - includeobjectRelated objects requested with the
includequery parameter.Only returned when theincludequery parameter is passed.Show child attributesHide child attributes1
- discountobjectThe
Discountmatchingdiscount_code.Only returned whenincludecontainsdiscountand a matchingDiscountexists.Show child attributesHide child attributes6
- idintegerUnique numeric identifier for the
Discount. - codestring · nullableThe code used to apply the
Discount. - valuefloatThe discounted value to be applied.
- value_typestringThe type of the discount value.Possible values
fixed_amountpercentageshipping - titlestring · nullableThe title of the
Discount. - application_methodstring · nullableHow the
Discountis applied.Possible valuescodeautomatic
{
"retention_strategy": {
"id": 9042,
"cancellation_flow_type": "subscription",
"created_at": "2026-08-03T18:22:10+00:00",
"discount_code": "STAY10",
"incentive_type": "discount",
"origin": null,
"prevention_text": "Stay with us and save 10% on your next order.",
"reason": "This is too expensive",
"updated_at": "2026-08-03T18:22:10+00:00"
}
}#List retention strategies
GET/retention_strategies
Returns a list of the store's
Retention strategies. By default only strategies without an origin are returned.Scope
read_subscriptionsQuery parameters
- cancellation_flow_typestringReturn the retention strategies offered for the given kind of cancellation.Possible values
subscriptionmembership - originstringPass
active_churn_flowto also return the retention strategies that belong to a cancellation flow.Possible valuesactive_churn_flow - includestringPass
discountto return theDiscountmatchingdiscount_codeunderinclude. Also requires theread_discountsscope.Possible valuesdiscount - sort_bystringSort the results by the given field and direction. Default is
id-desc.Possible valuesid-ascid-desc - limitintegerThe amount of results. Default is 50 while the maximum is 250.
- pageintegerThe page of results to show. Default is 1. Use
cursorinstead where possible. - cursorstringThe
next_cursororprevious_cursorvalue returned by a previous list request. When a cursor is passed, onlylimitcan be passed with it.
curl 'https://api.rechargeapps.com/retention_strategies' \
-H 'X-Recharge-Version: v2' \
-H 'X-Recharge-Access-Token: your_api_token'{
"retention_strategies": [
{
"id": 9042,
"cancellation_flow_type": "subscription",
"created_at": "2026-08-03T18:22:10+00:00",
"discount_code": "STAY10",
"incentive_type": "discount",
"origin": null,
"prevention_text": "Stay with us and save 10% on your next order.",
"reason": "This is too expensive",
"updated_at": "2026-08-03T18:22:10+00:00"
},
{
"id": 9041,
"cancellation_flow_type": "subscription",
"created_at": "2026-08-03T18:20:47+00:00",
"discount_code": null,
"incentive_type": "skip_charge",
"origin": null,
"prevention_text": "Need a break? Skip your next order instead.",
"reason": "I have too much product",
"updated_at": "2026-08-03T18:20:47+00:00"
}
],
"next_cursor": null,
"previous_cursor": null
}#Retrieve a retention strategy
GET/retention_strategies/{id}
Returns a single
Retention strategy by its id.Scope
read_subscriptionsQuery parameters
- includestringPass
discountto return theDiscountmatchingdiscount_codeunderinclude. Also requires theread_discountsscope.Possible valuesdiscount
curl 'https://api.rechargeapps.com/retention_strategies/129593' \
-H 'X-Recharge-Version: v2' \
-H 'X-Recharge-Access-Token: your_api_token'{
"retention_strategy": {
"id": 9042,
"cancellation_flow_type": "subscription",
"created_at": "2026-08-03T18:22:10+00:00",
"discount_code": "STAY10",
"incentive_type": "discount",
"origin": null,
"prevention_text": "Stay with us and save 10% on your next order.",
"reason": "This is too expensive",
"updated_at": "2026-08-03T18:22:10+00:00"
}
}#Create a retention strategy
POST/retention_strategies
Creates a
Retention strategy: a cancellation reason with the message, and optionally the incentive, shown to a customer who selects it.Scope
write_retention_strategiesBody parameters
- The cancellation reason shown to the customer. Maximum 255 characters.
- The message shown to the customer after selecting the cancellation reason. Maximum 255 characters.
- incentive_typestringThe incentive offered to the customer to prevent the cancellation. Strategies with a
cancellation_flow_typeofmembershiponly supportdiscount,swap_productor no incentive.Possible valuesdiscountskip_chargedelay_subscriptionswap_product - discount_codestringThe code of an existing, enabled
Discountto offer. Required whenincentive_typeisdiscount, and ignored for any otherincentive_type. - cancellation_flow_typestringThe kind of cancellation the
Retention strategyis offered for. Defaults tosubscription.Possible valuessubscriptionmembership - originstringPass
active_churn_flowto attach theRetention strategyto a cancellation flow.Possible valuesactive_churn_flow
curl -X POST 'https://api.rechargeapps.com/retention_strategies' \
-H 'X-Recharge-Version: v2' \
-H 'X-Recharge-Access-Token: your_api_token'{
"retention_strategy": {
"id": 9042,
"cancellation_flow_type": "subscription",
"created_at": "2026-08-03T18:22:10+00:00",
"discount_code": "STAY10",
"incentive_type": "discount",
"origin": null,
"prevention_text": "Stay with us and save 10% on your next order.",
"reason": "This is too expensive",
"updated_at": "2026-08-03T18:22:10+00:00"
}
}#Update a retention strategy
PUT/retention_strategies/{id}
Updates a
Retention strategy. Only the attributes passed in the request are changed; at least one attribute is required.Scope
write_retention_strategiesBody parameters
- reasonstringThe cancellation reason shown to the customer. Maximum 255 characters.
- prevention_textstringThe message shown to the customer after selecting the cancellation reason. Maximum 255 characters.
- incentive_typestringThe incentive offered to the customer to prevent the cancellation. Strategies with a
cancellation_flow_typeofmembershiponly supportdiscount,swap_productor no incentive.Possible valuesdiscountskip_chargedelay_subscriptionswap_product - discount_codestringThe code of an existing, enabled
Discountto offer. Required whenincentive_typeisdiscount, and ignored for any otherincentive_type. - cancellation_flow_typestringThe kind of cancellation the
Retention strategyis offered for. Defaults tosubscription.Possible valuessubscriptionmembership - originstringPass
active_churn_flowto attach theRetention strategyto a cancellation flow.Possible valuesactive_churn_flow
curl -X PUT 'https://api.rechargeapps.com/retention_strategies/129593' \
-H 'X-Recharge-Version: v2' \
-H 'X-Recharge-Access-Token: your_api_token'{
"retention_strategy": {
"id": 9042,
"cancellation_flow_type": "subscription",
"created_at": "2026-08-03T18:22:10+00:00",
"discount_code": "STAY10",
"incentive_type": "discount",
"origin": null,
"prevention_text": "Stay with us and save 10% on your next order.",
"reason": "This is too expensive",
"updated_at": "2026-08-03T18:22:10+00:00"
}
}#Delete a retention strategy
DELETE/retention_strategies/{id}
Permanently deletes a
Retention strategy.Scope
write_retention_strategiescurl -X DELETE 'https://api.rechargeapps.com/retention_strategies/129593' \
-H 'X-Recharge-Version: v2' \
-H 'X-Recharge-Access-Token: your_api_token'No content is returned for this response.