Preview plan change
Preview proration details for a plan change without applying it. Returns credit, charge, and net amount.
Preview proration details for a plan change without applying it. Returns credit, charge, and net amount.
application/json
TypeScript Definitions
Use the request body type in TypeScript.
1 <= length"weekly" | "monthly" | "quarterly" | "yearly" | "one_time"application/json
application/json
curl -X POST "https://commet.co/api/v1/subscriptions/string/preview-change" \ -H "Content-Type: application/json" \ -d '{ "planId": "string" }'application/json
Target plan public ID
Billing interval for the new plan. Defaults to current subscription interval.
Preview proration details for a plan change without applying it. Returns credit, charge, and net amount.
Subscription public ID
{
"success": true,
"data": {
"object": "subscription",
"livemode": true,
"currentPlanCredit": 0,
"newPlanCharge": 0,
"estimatedTotal": 0,
"effectiveDate": "2019-08-24T14:15:22Z",
"daysRemaining": 0,
{
"success": false,
"error": {
"type": "validation_error",
"code": "string",
"message": "string",
"doc_url": "string",
"param": "string"
}
}{
"success": false,
"error": {
"type": "validation_error",
"code": "string",
"message": "string",
"doc_url": "string",
"param": "string"
}
}