Schedules the subscription for cancellation at the end of the current billing period. The subscription remains active until then.
curl --request POST \
--url https://app.dynamicauth.com/api/v0/organizations/{organizationId}/billing/subscription/cancel \
--header 'Authorization: Bearer <token>'{
"hasPaymentMethod": true,
"planType": "free",
"inTrial": true,
"scope": [
"<string>"
],
"version": "<string>",
"billingPortalUrl": "<string>",
"billingPortalAddPaymentMethodUrl": "<string>",
"cancelAtPeriodEnd": true,
"trialStart": "2023-11-07T05:31:56Z",
"trialEnd": "2023-11-07T05:31:56Z",
"trialDaysLeft": 123,
"currentBillingPeriod": {
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"usagesCount": 123
},
"shouldLockEnvironmentSwitch": true,
"coupons": [
{
"coupon": "An example name"
}
]
}Documentation Index
Fetch the complete documentation index at: https://www.dynamic.xyz/docs/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
ID of organization
36^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"95b11417-f18f-457f-8804-68e361f9164f"
Success
Whether the organization has a valid payment method on file
free, advanced, enterprise, standard Whether the subscription is currently in a free trial period
List of feature scope strings included in the current subscription plan
Billing plan version identifier
URL to the Stripe billing portal for managing the subscription
URL to the Stripe billing portal pre-configured to add a payment method
When true, the subscription will be cancelled at the end of the current billing period
ISO 8601 timestamp of when the trial period started
ISO 8601 timestamp of when the trial period ends
Number of days remaining in the trial period
Show child attributes
When true, the user cannot switch between live and sandbox until payment is added
List of discount coupons applied to the subscription
Show child attributes
Was this page helpful?
curl --request POST \
--url https://app.dynamicauth.com/api/v0/organizations/{organizationId}/billing/subscription/cancel \
--header 'Authorization: Bearer <token>'{
"hasPaymentMethod": true,
"planType": "free",
"inTrial": true,
"scope": [
"<string>"
],
"version": "<string>",
"billingPortalUrl": "<string>",
"billingPortalAddPaymentMethodUrl": "<string>",
"cancelAtPeriodEnd": true,
"trialStart": "2023-11-07T05:31:56Z",
"trialEnd": "2023-11-07T05:31:56Z",
"trialDaysLeft": 123,
"currentBillingPeriod": {
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"usagesCount": 123
},
"shouldLockEnvironmentSwitch": true,
"coupons": [
{
"coupon": "An example name"
}
]
}