Subscription
Swap the subscription plan of a billable entity.
Swaps the Stripe subscription of the billable named by billable_id onto another plan without prorating, and records the new contracted monthly spend against that billable's organization. The target is the billable in the request, not the one belonging to the acting user.
post/api/subscription/swap-plan
Request
- Base URLhttps://api.sponsorunited.com (the document declares no server; this is the origin it was published from)
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"billable_id": 17,
"subscription_plan_id": "price_1PmxYxC7D8t3rP7mSia7osJP",
"contract_monthly_spend": 313.75
}Response
The swap was attempted. A successful swap returns the new plan; a billable that cannot be swapped (no Stripe customer, no Stripe subscription, or rejected by Stripe) returns an error.
Example response
{
"subscription_plan_id": "price_1PmxYxC7D8t3rP7mSia7osJP",
"error": "This account does not have a Stripe subscription"
}Changes
No recorded changes to this operation across all 2 revisions of this API.