curl --request GET \
--url https://us.api.flexprice.io/v1/subscriptions/schedules/{schedule_id}from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.subscriptions.get_subscription_schedule(schedule_id="<id>")
# 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.getSubscriptionSchedule("<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.GetSubscriptionSchedule(ctx, "<id>")
if err != nil {
log.Fatal(err)
}
if res.SubscriptionScheduleResponse != nil {
// handle response
}
}{
"can_be_cancelled": true,
"cancelled_at": "2023-11-07T05:31:56Z",
"configuration": {},
"configuration_details": {
"plan_change": {
"billing_period_behaviour": "unchanged",
"entity_policies": {
"addons": {
"default_behaviour": "carry",
"overrides": {}
}
},
"target_plan_id": "<string>"
}
},
"created_at": "2023-11-07T05:31:56Z",
"days_until_execution": 123,
"error_message": "<string>",
"executed_at": "2023-11-07T05:31:56Z",
"execution_details": {
"plan_change": {
"change_type": "<string>",
"effective_date": "2023-11-07T05:31:56Z",
"from_plan_id": "<string>",
"previous_subscription_id": "<string>",
"subscription_id": "<string>",
"to_plan_id": "<string>"
}
},
"execution_result": {},
"id": "<string>",
"metadata": {},
"schedule_type": "plan_change",
"scheduled_at": "2023-11-07T05:31:56Z",
"status": "pending",
"subscription_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}Get subscription schedule
Use when you need to load a single scheduled change (e.g. to show when a plan change or renewal takes effect).
curl --request GET \
--url https://us.api.flexprice.io/v1/subscriptions/schedules/{schedule_id}from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.subscriptions.get_subscription_schedule(schedule_id="<id>")
# 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.getSubscriptionSchedule("<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.GetSubscriptionSchedule(ctx, "<id>")
if err != nil {
log.Fatal(err)
}
if res.SubscriptionScheduleResponse != nil {
// handle response
}
}{
"can_be_cancelled": true,
"cancelled_at": "2023-11-07T05:31:56Z",
"configuration": {},
"configuration_details": {
"plan_change": {
"billing_period_behaviour": "unchanged",
"entity_policies": {
"addons": {
"default_behaviour": "carry",
"overrides": {}
}
},
"target_plan_id": "<string>"
}
},
"created_at": "2023-11-07T05:31:56Z",
"days_until_execution": 123,
"error_message": "<string>",
"executed_at": "2023-11-07T05:31:56Z",
"execution_details": {
"plan_change": {
"change_type": "<string>",
"effective_date": "2023-11-07T05:31:56Z",
"from_plan_id": "<string>",
"previous_subscription_id": "<string>",
"subscription_id": "<string>",
"to_plan_id": "<string>"
}
},
"execution_result": {},
"id": "<string>",
"metadata": {},
"schedule_type": "plan_change",
"scheduled_at": "2023-11-07T05:31:56Z",
"status": "pending",
"subscription_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}Path Parameters
Schedule ID
Response
OK
Full details of a subscription schedule
can_be_cancelled indicates if the schedule can be cancelled
cancelled_at is when the schedule was cancelled
configuration is the raw type-specific configuration. Deprecated: use configuration_details.
Show child attributes
Show child attributes
created_at timestamp
days_until_execution is the number of days until execution
error_message contains the error if execution failed
executed_at is when the schedule was executed
Show child attributes
Show child attributes
execution_result is the raw type-specific execution result. Deprecated: use execution_details.
id of the schedule
metadata from the schedule
Show child attributes
Show child attributes
plan_change, cancellation scheduled_at is when the schedule will execute
pending, executing, executed, cancelled, failed subscription_id is the ID of the subscription
updated_at timestamp

