---
title: "Change subscription plan"
method: PATCH
path: "/api/stripe/subscription"
tags: ["Billing"]
---

# Change subscription plan

`PATCH /api/stripe/subscription`

## Request

- Base URL: `https://api.xpoz.ai`
- URL: `https://api.xpoz.ai/api/stripe/subscription`
- Auth: HTTP bearer

Switch the caller's active subscription to another plan and/or billing period.

## Request body

- object
  - `planName` string, required
  - `billingPeriod` 'monthly' | 'annual'

## Response `200`

Changed.

- object
  - `success` true, required
  - `message` string, required
  - `subscription` object, required
    - `planName` string, required
    - `billingPeriod` 'monthly' | 'annual', required

## Other responses

- `400`: Validation failed.
- `401`: Missing or invalid credentials.
- `404`: No active subscription.
- `500`: Server error.

---

[API](https://skmtc.dev/xpoz/apis/xpoz-api.md) · [All operations](https://skmtc.dev/xpoz/apis/xpoz-api/llms.txt) · [OpenAPI document](https://skmtc.dev/xpoz/apis/xpoz-api/revisions/c18261f587a4?raw)
