Cancel a subscription
Cancels the subscription and emails the customer a cancellation notice. The optional body records the cancellation reason, returned as cancellation_reason_code and cancellation_reason_text on the subscription. Returns the cancelled subscription. Requires a Bearer token with the subscriptions update permission; a customer token may cancel the customer’s own subscriptions. Returns 404 when the subscription is not visible to the caller.
curl --request POST \
--url https://api.fluid.app/api/subscriptions/{token}/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason_code": "support_request"
}
'import requests
url = "https://api.fluid.app/api/subscriptions/{token}/cancel"
payload = { "reason_code": "support_request" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason_code: 'support_request'})
};
fetch('https://api.fluid.app/api/subscriptions/{token}/cancel', 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://api.fluid.app/api/subscriptions/{token}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'reason_code' => 'support_request'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fluid.app/api/subscriptions/{token}/cancel"
payload := strings.NewReader("{\n \"reason_code\": \"support_request\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fluid.app/api/subscriptions/{token}/cancel")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason_code\": \"support_request\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/subscriptions/{token}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason_code\": \"support_request\"\n}"
response = http.request(request)
puts response.read_body{
"subscription": {
"id": 184305,
"address": {
"id": 73518,
"address1": "18 Main Street",
"address2": null,
"address3": null,
"city": "Nashua",
"country_code": "US",
"country_num_code": 840,
"default": true,
"name": "Holly Flax",
"phone": "+16035550147",
"postal_code": "03060",
"state": "NH",
"subdivision_code": null
},
"address_id": 73518,
"attempts": 0,
"auto_apply_points": false,
"baked_discounts": [],
"base_recurring_price": 54.99,
"billing_cycle_limit_reached": false,
"bundled_items": [],
"bundled_subscriptions": [],
"cancelled_at": "2026-09-30T13:25:09Z",
"cancellation_reason_code": "support_request",
"cancellation_reason_text": null,
"company": {
"id": 1405,
"name": "Dunder Mifflin Paper Company"
},
"country": {
"id": 214,
"iso": "US",
"name": "United States"
},
"created_at": "2026-09-02T15:24:51Z",
"currency": {
"id": 1,
"active": true,
"code": "USD",
"name": "United States Dollar",
"rate": "1.0",
"symbol": "$"
},
"customer": {
"id": 48213,
"account_id": "DM-48213",
"active": true,
"addresses": [
{
"id": 73518,
"address1": "18 Main Street",
"address2": null,
"address3": null,
"city": "Nashua",
"country_code": "US",
"country_num_code": 840,
"default": true,
"name": "Holly Flax",
"phone": "+16035550147",
"postal_code": "03060",
"state": "NH",
"subdivision_code": null
}
],
"created_at": "2026-09-02T15:18:44Z",
"customer_notes": [],
"default_address": {
"id": 73518,
"address1": "18 Main Street",
"address2": null,
"address3": null,
"city": "Nashua",
"country_code": "US",
"country_num_code": 840,
"default": true,
"name": "Holly Flax",
"phone": "+16035550147",
"postal_code": "03060",
"state": "NH",
"subdivision_code": null
},
"display_total_spent": "$164.97 (USD)",
"email": "holly.flax@gmail.com",
"email_marketing": true,
"external_id": null,
"first_name": "Holly",
"full_name": "Holly Flax",
"is_discarded": false,
"is_rep": false,
"last_name": "Flax",
"last_order_id": null,
"metadata": {},
"name": "Holly Flax",
"notes": null,
"orders_count": 3,
"payment_methods": [
{
"id": 90412,
"company_id": 1405,
"created_at": "2026-09-02T15:21:08Z",
"logo_url": "https://assets.fluid.app/images/payment_icons/visa.svg",
"payment_title": "Credit Card",
"source": "card",
"updated_at": "2026-09-02T15:21:08Z",
"user_id": null
}
],
"phone": "+16035550147",
"role": "customer",
"sales_tax_id": null,
"sms_marketing": false,
"tax_exempt": false,
"total_spent": "164.97",
"user_company_id": 48213,
"verified_email": true
},
"customer_notes": [
{
"id": 5582,
"created_at": "2026-09-12T14:03:27Z",
"customer_id": 48213,
"note": "Customer asked to move deliveries to the first half of the month.",
"resource_id": 184305,
"resource_type": "Commerce::Subscription",
"user_company": {
"id": 20417,
"first_name": "Dwight",
"last_name": "Schrute",
"full_name": "Dwight Schrute",
"email": "dwight.schrute@dundermifflin.com",
"image_url": "https://cdn.fluid.app/dunder-mifflin/avatars/dwight-schrute.jpg"
},
"user_company_id": 20417
}
],
"cv": "40.0",
"cv_total": "40.0",
"decline_count": 0,
"digital": false,
"disabled": false,
"last_bill_date": "2026-09-02T15:24:51Z",
"last_failed_at": null,
"last_ship_date": null,
"max_skips": null,
"next_bill_date": "2026-10-02T14:00:00Z",
"next_retry_at": null,
"next_ship_date": null,
"notes": null,
"orders": [],
"original_price": 54.99,
"payment_method": {
"id": 90412,
"au_status": null,
"billing_address": null,
"created_at": "2026-09-02T15:21:08Z",
"default": true,
"details": {
"id": 90412,
"type": "CreditCard",
"card_network": "visa",
"card_brand": "Visa",
"last4_digits": "4242",
"last_four": "4242",
"exp_month": "11",
"exp_year": "2029",
"logo_url": "https://assets.fluid.app/images/payment_icons/visa.svg",
"vgs_card_id": null,
"requires_3ds": false
},
"payment_title": "Credit Card",
"payment_type": "Credit Card",
"source": "card",
"updated_at": "2026-09-02T15:21:08Z"
},
"price": 49.99,
"quantity": 1,
"qv": "40.0",
"qv_total": "40.0",
"renewal_discount_total": 0,
"skipped_count": 0,
"status": "cancelled",
"subscription_discounts": [],
"subscription_plan": {
"id": 3127,
"active": true,
"allow_max_billing_cycles": false,
"allow_skipping": true,
"apply_to_volume": true,
"billing_frequency_in_words": "1 month",
"billing_interval": 1,
"billing_interval_unit": "month",
"company_default": true,
"created_at": "2026-09-01T13:00:00Z",
"max_billing_cycles": null,
"max_skips": 2,
"name": "Monthly Paper Delivery",
"price_adjustment_amount": 5,
"price_adjustment_type": "fixed_amount",
"products_count": 4,
"savings_display_mode": "amount",
"shipping_interval": 1,
"shipping_interval_unit": "month",
"split_volume": false,
"subscribers_count": 212,
"trial_period": null,
"trial_period_unit": null,
"updated_at": "2026-09-01T13:00:00Z",
"volume_interval": 1,
"volume_interval_unit": "month"
},
"subscription_skips": [],
"subscription_token": "sb_3f9a1c7e5b2d4086",
"successful_billing_cycles": 1,
"timezone": "America/New_York",
"updated_at": "2026-09-30T13:25:09Z",
"variant": {
"id": 61842,
"currency_code": "USD",
"display_name": null,
"image_path": null,
"image_url": null,
"options": [],
"price": "54.99",
"price_in_currency": "$54.99",
"primary_image": null,
"product": {
"id": 20931,
"canonical_url": "https://shop.dundermifflin.com/products/20lb-copy-paper",
"cv": "40.0",
"cv_in_currency": "$40.00",
"external_id": null,
"image_path": null,
"image_url": "https://cdn.fluid.app/dunder-mifflin/products/20lb-copy-paper.jpg",
"introduction": null,
"metadata": {},
"metafields": [],
"price": "54.99",
"price_in_currency": "$54.99",
"sku": "DM-20LB",
"tax": "0.0",
"tax_in_currency": "$0.00",
"title": "Dunder Mifflin 20lb Copy Paper"
},
"sku": "DM-20LB-CASE",
"title": null
},
"volume_rep": {
"id": 20417,
"email": "dwight.schrute@dundermifflin.com",
"full_name": "Dwight Schrute",
"image_url": "https://cdn.fluid.app/dunder-mifflin/avatars/dwight-schrute.jpg",
"external_id": "DM-REP-0007"
},
"volume_rep_member_id": "3b8e2f41-9c6d-4a7e-b215-6f0d8c3a9e74"
},
"meta": {
"request_id": "a52d8e17-6c4b-4f39-8d01-3e7f9b2c6a45",
"timestamp": "2026-09-30T13:25:09Z"
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>",
"blocked_date": "2026-11-30",
"blocked_day": 30,
"allowed_date": "2026-11-28",
"scheduled_date": "2026-12-10",
"last_bill_date": "2026-11-10",
"requested_date": "2026-11-30",
"payment_uuid": "<string>",
"error_details": [
{
"code": "<string>",
"field": "<string>",
"payment": "not_attempted",
"message": "<string>"
}
],
"coded_recovery": true
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>",
"blocked_date": "2026-11-30",
"blocked_day": 30,
"allowed_date": "2026-11-28",
"scheduled_date": "2026-12-10",
"last_bill_date": "2026-11-10",
"requested_date": "2026-11-30",
"payment_uuid": "<string>",
"error_details": [
{
"code": "<string>",
"field": "<string>",
"payment": "not_attempted",
"message": "<string>"
}
],
"coded_recovery": true
}
}Body
Why the subscription is being cancelled. Both fields are optional.
A cancellation reason code. A company admin or a back-office caller
(a droplet or machine token) may send any code. Any other caller,
including a customer or rep token, may send only the customer codes
(too_expensive, too_much_product, too_frequent,
not_seeing_results, did_not_like_product, switching_brand,
shipping_or_delivery_issue, taking_a_break,
moving_or_life_change, other). Omitted or null records
merchant_initiated for a company admin or back-office caller and
unknown otherwise. A code the caller may not send returns 422.
too_expensive, too_much_product, too_frequent, not_seeing_results, did_not_like_product, switching_brand, shipping_or_delivery_issue, taking_a_break, moving_or_life_change, other, merchant_initiated, support_request, max_cycles_reached, dunning_exhausted, customer_deleted, fraud, unknown, null "support_request"
Response
Success
Any valid JSON value for provider, integration, theme, metadata, or other dynamic payloads whose keys are not fixed by the API contract.
curl --request POST \
--url https://api.fluid.app/api/subscriptions/{token}/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason_code": "support_request"
}
'import requests
url = "https://api.fluid.app/api/subscriptions/{token}/cancel"
payload = { "reason_code": "support_request" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason_code: 'support_request'})
};
fetch('https://api.fluid.app/api/subscriptions/{token}/cancel', 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://api.fluid.app/api/subscriptions/{token}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'reason_code' => 'support_request'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fluid.app/api/subscriptions/{token}/cancel"
payload := strings.NewReader("{\n \"reason_code\": \"support_request\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fluid.app/api/subscriptions/{token}/cancel")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason_code\": \"support_request\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/subscriptions/{token}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason_code\": \"support_request\"\n}"
response = http.request(request)
puts response.read_body{
"subscription": {
"id": 184305,
"address": {
"id": 73518,
"address1": "18 Main Street",
"address2": null,
"address3": null,
"city": "Nashua",
"country_code": "US",
"country_num_code": 840,
"default": true,
"name": "Holly Flax",
"phone": "+16035550147",
"postal_code": "03060",
"state": "NH",
"subdivision_code": null
},
"address_id": 73518,
"attempts": 0,
"auto_apply_points": false,
"baked_discounts": [],
"base_recurring_price": 54.99,
"billing_cycle_limit_reached": false,
"bundled_items": [],
"bundled_subscriptions": [],
"cancelled_at": "2026-09-30T13:25:09Z",
"cancellation_reason_code": "support_request",
"cancellation_reason_text": null,
"company": {
"id": 1405,
"name": "Dunder Mifflin Paper Company"
},
"country": {
"id": 214,
"iso": "US",
"name": "United States"
},
"created_at": "2026-09-02T15:24:51Z",
"currency": {
"id": 1,
"active": true,
"code": "USD",
"name": "United States Dollar",
"rate": "1.0",
"symbol": "$"
},
"customer": {
"id": 48213,
"account_id": "DM-48213",
"active": true,
"addresses": [
{
"id": 73518,
"address1": "18 Main Street",
"address2": null,
"address3": null,
"city": "Nashua",
"country_code": "US",
"country_num_code": 840,
"default": true,
"name": "Holly Flax",
"phone": "+16035550147",
"postal_code": "03060",
"state": "NH",
"subdivision_code": null
}
],
"created_at": "2026-09-02T15:18:44Z",
"customer_notes": [],
"default_address": {
"id": 73518,
"address1": "18 Main Street",
"address2": null,
"address3": null,
"city": "Nashua",
"country_code": "US",
"country_num_code": 840,
"default": true,
"name": "Holly Flax",
"phone": "+16035550147",
"postal_code": "03060",
"state": "NH",
"subdivision_code": null
},
"display_total_spent": "$164.97 (USD)",
"email": "holly.flax@gmail.com",
"email_marketing": true,
"external_id": null,
"first_name": "Holly",
"full_name": "Holly Flax",
"is_discarded": false,
"is_rep": false,
"last_name": "Flax",
"last_order_id": null,
"metadata": {},
"name": "Holly Flax",
"notes": null,
"orders_count": 3,
"payment_methods": [
{
"id": 90412,
"company_id": 1405,
"created_at": "2026-09-02T15:21:08Z",
"logo_url": "https://assets.fluid.app/images/payment_icons/visa.svg",
"payment_title": "Credit Card",
"source": "card",
"updated_at": "2026-09-02T15:21:08Z",
"user_id": null
}
],
"phone": "+16035550147",
"role": "customer",
"sales_tax_id": null,
"sms_marketing": false,
"tax_exempt": false,
"total_spent": "164.97",
"user_company_id": 48213,
"verified_email": true
},
"customer_notes": [
{
"id": 5582,
"created_at": "2026-09-12T14:03:27Z",
"customer_id": 48213,
"note": "Customer asked to move deliveries to the first half of the month.",
"resource_id": 184305,
"resource_type": "Commerce::Subscription",
"user_company": {
"id": 20417,
"first_name": "Dwight",
"last_name": "Schrute",
"full_name": "Dwight Schrute",
"email": "dwight.schrute@dundermifflin.com",
"image_url": "https://cdn.fluid.app/dunder-mifflin/avatars/dwight-schrute.jpg"
},
"user_company_id": 20417
}
],
"cv": "40.0",
"cv_total": "40.0",
"decline_count": 0,
"digital": false,
"disabled": false,
"last_bill_date": "2026-09-02T15:24:51Z",
"last_failed_at": null,
"last_ship_date": null,
"max_skips": null,
"next_bill_date": "2026-10-02T14:00:00Z",
"next_retry_at": null,
"next_ship_date": null,
"notes": null,
"orders": [],
"original_price": 54.99,
"payment_method": {
"id": 90412,
"au_status": null,
"billing_address": null,
"created_at": "2026-09-02T15:21:08Z",
"default": true,
"details": {
"id": 90412,
"type": "CreditCard",
"card_network": "visa",
"card_brand": "Visa",
"last4_digits": "4242",
"last_four": "4242",
"exp_month": "11",
"exp_year": "2029",
"logo_url": "https://assets.fluid.app/images/payment_icons/visa.svg",
"vgs_card_id": null,
"requires_3ds": false
},
"payment_title": "Credit Card",
"payment_type": "Credit Card",
"source": "card",
"updated_at": "2026-09-02T15:21:08Z"
},
"price": 49.99,
"quantity": 1,
"qv": "40.0",
"qv_total": "40.0",
"renewal_discount_total": 0,
"skipped_count": 0,
"status": "cancelled",
"subscription_discounts": [],
"subscription_plan": {
"id": 3127,
"active": true,
"allow_max_billing_cycles": false,
"allow_skipping": true,
"apply_to_volume": true,
"billing_frequency_in_words": "1 month",
"billing_interval": 1,
"billing_interval_unit": "month",
"company_default": true,
"created_at": "2026-09-01T13:00:00Z",
"max_billing_cycles": null,
"max_skips": 2,
"name": "Monthly Paper Delivery",
"price_adjustment_amount": 5,
"price_adjustment_type": "fixed_amount",
"products_count": 4,
"savings_display_mode": "amount",
"shipping_interval": 1,
"shipping_interval_unit": "month",
"split_volume": false,
"subscribers_count": 212,
"trial_period": null,
"trial_period_unit": null,
"updated_at": "2026-09-01T13:00:00Z",
"volume_interval": 1,
"volume_interval_unit": "month"
},
"subscription_skips": [],
"subscription_token": "sb_3f9a1c7e5b2d4086",
"successful_billing_cycles": 1,
"timezone": "America/New_York",
"updated_at": "2026-09-30T13:25:09Z",
"variant": {
"id": 61842,
"currency_code": "USD",
"display_name": null,
"image_path": null,
"image_url": null,
"options": [],
"price": "54.99",
"price_in_currency": "$54.99",
"primary_image": null,
"product": {
"id": 20931,
"canonical_url": "https://shop.dundermifflin.com/products/20lb-copy-paper",
"cv": "40.0",
"cv_in_currency": "$40.00",
"external_id": null,
"image_path": null,
"image_url": "https://cdn.fluid.app/dunder-mifflin/products/20lb-copy-paper.jpg",
"introduction": null,
"metadata": {},
"metafields": [],
"price": "54.99",
"price_in_currency": "$54.99",
"sku": "DM-20LB",
"tax": "0.0",
"tax_in_currency": "$0.00",
"title": "Dunder Mifflin 20lb Copy Paper"
},
"sku": "DM-20LB-CASE",
"title": null
},
"volume_rep": {
"id": 20417,
"email": "dwight.schrute@dundermifflin.com",
"full_name": "Dwight Schrute",
"image_url": "https://cdn.fluid.app/dunder-mifflin/avatars/dwight-schrute.jpg",
"external_id": "DM-REP-0007"
},
"volume_rep_member_id": "3b8e2f41-9c6d-4a7e-b215-6f0d8c3a9e74"
},
"meta": {
"request_id": "a52d8e17-6c4b-4f39-8d01-3e7f9b2c6a45",
"timestamp": "2026-09-30T13:25:09Z"
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>",
"blocked_date": "2026-11-30",
"blocked_day": 30,
"allowed_date": "2026-11-28",
"scheduled_date": "2026-12-10",
"last_bill_date": "2026-11-10",
"requested_date": "2026-11-30",
"payment_uuid": "<string>",
"error_details": [
{
"code": "<string>",
"field": "<string>",
"payment": "not_attempted",
"message": "<string>"
}
],
"coded_recovery": true
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>",
"blocked_date": "2026-11-30",
"blocked_day": 30,
"allowed_date": "2026-11-28",
"scheduled_date": "2026-12-10",
"last_bill_date": "2026-11-10",
"requested_date": "2026-11-30",
"payment_uuid": "<string>",
"error_details": [
{
"code": "<string>",
"field": "<string>",
"payment": "not_attempted",
"message": "<string>"
}
],
"coded_recovery": true
}
}