subscriptions
Remove subscription discount
Detaches the discount {id} from the subscription {token}. Requires a
bearer token. Returns 422 when it cannot be removed, 403 when not
permitted, 404 when the subscription or discount is not found, and 401
when unauthenticated.
DELETE
/
api
/
checkout
/
v2026-04
/
subscriptions
/
{token}
/
discounts
/
{id}
Remove subscription discount
curl --request DELETE \
--url https://api.fluid.app/api/checkout/v2026-04/subscriptions/{token}/discounts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"removed_detail": "<string>"
}
'import requests
url = "https://api.fluid.app/api/checkout/v2026-04/subscriptions/{token}/discounts/{id}"
payload = { "removed_detail": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({removed_detail: '<string>'})
};
fetch('https://api.fluid.app/api/checkout/v2026-04/subscriptions/{token}/discounts/{id}', 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/checkout/v2026-04/subscriptions/{token}/discounts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'removed_detail' => '<string>'
]),
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/checkout/v2026-04/subscriptions/{token}/discounts/{id}"
payload := strings.NewReader("{\n \"removed_detail\": \"<string>\"\n}")
req, _ := http.NewRequest("DELETE", 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.delete("https://api.fluid.app/api/checkout/v2026-04/subscriptions/{token}/discounts/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"removed_detail\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/checkout/v2026-04/subscriptions/{token}/discounts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"removed_detail\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"subscription_discount": {
"id": 123,
"company_id": 123,
"subscription_id": 123,
"discount_id": 123,
"discount_version_id": 123,
"attached_by_member_id": "<string>",
"attached_by_droplet_installation_id": 123,
"duration_cycles": 123,
"applied_cycles": 123,
"removed_reason": "<string>",
"removed_detail": "<string>",
"attached_via": "<string>",
"notes": "<string>",
"starts_at": "2023-11-07T05:31:56Z",
"removed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"discount": {
"id": 123,
"code": "<string>"
},
"discount_version": {
"id": 123,
"version_number": 123,
"code": "<string>",
"price_discount_type": "<string>",
"flat_value": 123,
"percentage_value": 123,
"apply_to_volume": true
},
"attached_by": {
"id": 123,
"label": "<string>"
}
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}Authorizations
Bearer token authentication
Body
application/json
⌘I
Remove subscription discount
curl --request DELETE \
--url https://api.fluid.app/api/checkout/v2026-04/subscriptions/{token}/discounts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"removed_detail": "<string>"
}
'import requests
url = "https://api.fluid.app/api/checkout/v2026-04/subscriptions/{token}/discounts/{id}"
payload = { "removed_detail": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({removed_detail: '<string>'})
};
fetch('https://api.fluid.app/api/checkout/v2026-04/subscriptions/{token}/discounts/{id}', 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/checkout/v2026-04/subscriptions/{token}/discounts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'removed_detail' => '<string>'
]),
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/checkout/v2026-04/subscriptions/{token}/discounts/{id}"
payload := strings.NewReader("{\n \"removed_detail\": \"<string>\"\n}")
req, _ := http.NewRequest("DELETE", 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.delete("https://api.fluid.app/api/checkout/v2026-04/subscriptions/{token}/discounts/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"removed_detail\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/checkout/v2026-04/subscriptions/{token}/discounts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"removed_detail\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"subscription_discount": {
"id": 123,
"company_id": 123,
"subscription_id": 123,
"discount_id": 123,
"discount_version_id": 123,
"attached_by_member_id": "<string>",
"attached_by_droplet_installation_id": 123,
"duration_cycles": 123,
"applied_cycles": 123,
"removed_reason": "<string>",
"removed_detail": "<string>",
"attached_via": "<string>",
"notes": "<string>",
"starts_at": "2023-11-07T05:31:56Z",
"removed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"discount": {
"id": 123,
"code": "<string>"
},
"discount_version": {
"id": 123,
"version_number": 123,
"code": "<string>",
"price_discount_type": "<string>",
"flat_value": 123,
"percentage_value": 123,
"apply_to_volume": true
},
"attached_by": {
"id": 123,
"label": "<string>"
}
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}