cURL
curl --request GET \
--url https://api.tirdad.ai/v1/subscriptions/schedules/{schedule_id}from tirdad_sdk import Tirdad
with Tirdad(
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 { Tirdad } from "@tirdad/sdk";
const tirdad = new Tirdad({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await tirdad.subscriptions.getSubscriptionSchedule("<id>");
console.log(result);
}
run();package main
import(
"context"
tirdad "github.com/tirdad-billing/go-sdk/v2"
"log"
)
func main() {
ctx := context.Background()
s := tirdad.New(
tirdad.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"
}Subscriptions
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).
GET
/
subscriptions
/
schedules
/
{schedule_id}
cURL
curl --request GET \
--url https://api.tirdad.ai/v1/subscriptions/schedules/{schedule_id}from tirdad_sdk import Tirdad
with Tirdad(
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 { Tirdad } from "@tirdad/sdk";
const tirdad = new Tirdad({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await tirdad.subscriptions.getSubscriptionSchedule("<id>");
console.log(result);
}
run();package main
import(
"context"
tirdad "github.com/tirdad-billing/go-sdk/v2"
"log"
)
func main() {
ctx := context.Background()
s := tirdad.New(
tirdad.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"
}Response
200 - application/json
OK
Full details of a subscription schedule