Cancel subscription schedule
curl --request POST \
--url https://us.api.flexprice.io/v1/v1/subscriptions/schedules/{schedule_id}/cancel \
--header 'Content-Type: application/json' \
--data '
{
"schedule_id": "<string>",
"subscription_id": "<string>"
}
'import requests
url = "https://us.api.flexprice.io/v1/v1/subscriptions/schedules/{schedule_id}/cancel"
payload = {
"schedule_id": "<string>",
"subscription_id": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({schedule_id: '<string>', subscription_id: '<string>'})
};
fetch('https://us.api.flexprice.io/v1/v1/subscriptions/schedules/{schedule_id}/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://us.api.flexprice.io/v1/v1/subscriptions/schedules/{schedule_id}/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([
'schedule_id' => '<string>',
'subscription_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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://us.api.flexprice.io/v1/v1/subscriptions/schedules/{schedule_id}/cancel"
payload := strings.NewReader("{\n \"schedule_id\": \"<string>\",\n \"subscription_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://us.api.flexprice.io/v1/v1/subscriptions/schedules/{schedule_id}/cancel")
.header("Content-Type", "application/json")
.body("{\n \"schedule_id\": \"<string>\",\n \"subscription_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://us.api.flexprice.io/v1/v1/subscriptions/schedules/{schedule_id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"schedule_id\": \"<string>\",\n \"subscription_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"status": "pending"
}Subscriptions
Cancel subscription schedule
Use when cancelling a scheduled change (e.g. customer changed mind). Identify by schedule ID in path or by subscription ID + schedule type in body.
POST
/
v1
/
subscriptions
/
schedules
/
{schedule_id}
/
cancel
Cancel subscription schedule
curl --request POST \
--url https://us.api.flexprice.io/v1/v1/subscriptions/schedules/{schedule_id}/cancel \
--header 'Content-Type: application/json' \
--data '
{
"schedule_id": "<string>",
"subscription_id": "<string>"
}
'import requests
url = "https://us.api.flexprice.io/v1/v1/subscriptions/schedules/{schedule_id}/cancel"
payload = {
"schedule_id": "<string>",
"subscription_id": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({schedule_id: '<string>', subscription_id: '<string>'})
};
fetch('https://us.api.flexprice.io/v1/v1/subscriptions/schedules/{schedule_id}/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://us.api.flexprice.io/v1/v1/subscriptions/schedules/{schedule_id}/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([
'schedule_id' => '<string>',
'subscription_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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://us.api.flexprice.io/v1/v1/subscriptions/schedules/{schedule_id}/cancel"
payload := strings.NewReader("{\n \"schedule_id\": \"<string>\",\n \"subscription_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://us.api.flexprice.io/v1/v1/subscriptions/schedules/{schedule_id}/cancel")
.header("Content-Type", "application/json")
.body("{\n \"schedule_id\": \"<string>\",\n \"subscription_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://us.api.flexprice.io/v1/v1/subscriptions/schedules/{schedule_id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"schedule_id\": \"<string>\",\n \"subscription_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"status": "pending"
}Path Parameters
Schedule ID (optional if using request body)
Body
application/json
Cancel request (optional if using path parameter)
Request to cancel a subscription schedule (supports two modes)
schedule_id is the ID of the schedule to cancel (optional if subscription_id and schedule_type are provided)
Available options:
plan_change, cancellation subscription_id is the ID of the subscription (required if schedule_id is not provided)

