Cancellation
List Cancellation Reasons
Retrieve all available cancellation reasons that can be attached to a subscription cancellation.
GET
/
v1
/
cancellation-reasons
List cancellation reasons
curl --request GET \
--url https://billing.example.com/v1/cancellation-reasons \
--header 'Authorization: Bearer <token>'import requests
url = "https://billing.example.com/v1/cancellation-reasons"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://billing.example.com/v1/cancellation-reasons', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://billing.example.com/v1/cancellation-reasons",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://billing.example.com/v1/cancellation-reasons"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://billing.example.com/v1/cancellation-reasons")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://billing.example.com/v1/cancellation-reasons")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "list",
"data": [
{
"id": "too_expensive",
"label": "<string>",
"allows_feedback": true
}
]
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>"
}
}Returns the full list of cancellation reasons configured for your account. Each reason has a unique identifier, a human-readable label, and a category for grouping in UI flows. These reason identifiers are passed to the Cancel Subscription endpoint.
Example Request
curl -X GET https://api.recurso.io/v1/cancellation-reasons \
-H "Authorization: Bearer sk_live_26PHem9AhJZvU..." \
-H "Content-Type: application/json"
Response
{
"object": "list",
"data": [
{
"id": "too_expensive",
"label": "Too expensive",
"category": "pricing"
},
{
"id": "missing_features",
"label": "Missing features I need",
"category": "product"
},
{
"id": "switched_competitor",
"label": "Switched to a competitor",
"category": "competitive"
},
{
"id": "not_using_enough",
"label": "Not using the product enough",
"category": "usage"
},
{
"id": "poor_support",
"label": "Customer support was not helpful",
"category": "support"
},
{
"id": "temporary_pause",
"label": "Temporarily pausing my account",
"category": "usage"
},
{
"id": "other",
"label": "Other",
"category": "other"
}
]
}
⌘I
List cancellation reasons
curl --request GET \
--url https://billing.example.com/v1/cancellation-reasons \
--header 'Authorization: Bearer <token>'import requests
url = "https://billing.example.com/v1/cancellation-reasons"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://billing.example.com/v1/cancellation-reasons', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://billing.example.com/v1/cancellation-reasons",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://billing.example.com/v1/cancellation-reasons"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://billing.example.com/v1/cancellation-reasons")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://billing.example.com/v1/cancellation-reasons")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "list",
"data": [
{
"id": "too_expensive",
"label": "<string>",
"allows_feedback": true
}
]
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>"
}
}