{"openapi":"3.1.0","info":{"title":"POST /api/v1/billing/change-plan","version":"1.0.0","description":"Change Plan"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/billing/change-plan":{"post":{"tags":["billing"],"summary":"Change Plan","description":"Switch the base subscription plan to a different price.\n\n**Request Body:**\n- `price_id`: Stripe Price ID for the new plan\n\n**Effect:** The base plan line item is swapped and the proration is invoiced immediately.","operationId":"change_plan_api_v1_billing_change_plan_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-business-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Business-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanChangeRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"PlanChangeRequest":{"properties":{"price_id":{"type":"string","title":"Price Id","description":"Stripe Price ID for the new plan."}},"type":"object","required":["price_id"],"title":"PlanChangeRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Token","description":"API token authentication. Format: `Bearer dz_...`"}}},"security":[{"BearerAuth":[]}]}