cURL
curl --request POST \
--url https://us.api.flexprice.io/v1/subscriptions/schedules/{schedule_id}/cancel \
--header 'Content-Type: application/json' \
--data '
{
"schedule_id": "<string>",
"subscription_id": "<string>"
}
'from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.subscriptions.cancel_subscription_schedule(schedule_id_param="<value>")
# Handle response
print(res)import { Flexprice } from "@flexprice/sdk";
const flexprice = new Flexprice({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await flexprice.subscriptions.cancelSubscriptionSchedule("<id>");
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Subscriptions.CancelSubscriptionSchedule(ctx, "<id>", nil)
if err != nil {
log.Fatal(err)
}
if res.CancelScheduleResponse != nil {
// handle response
}
}{
"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
/
subscriptions
/
schedules
/
{schedule_id}
/
cancel
cURL
curl --request POST \
--url https://us.api.flexprice.io/v1/subscriptions/schedules/{schedule_id}/cancel \
--header 'Content-Type: application/json' \
--data '
{
"schedule_id": "<string>",
"subscription_id": "<string>"
}
'from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.subscriptions.cancel_subscription_schedule(schedule_id_param="<value>")
# Handle response
print(res)import { Flexprice } from "@flexprice/sdk";
const flexprice = new Flexprice({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await flexprice.subscriptions.cancelSubscriptionSchedule("<id>");
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Subscriptions.CancelSubscriptionSchedule(ctx, "<id>", nil)
if err != nil {
log.Fatal(err)
}
if res.CancelScheduleResponse != nil {
// handle response
}
}{
"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)

