---
title: "Subscribe or change plan"
method: POST
path: "/api/v1/wallet/subscribe"
tags: ["Wallet"]
---

# Subscribe or change plan

`POST /api/v1/wallet/subscribe`

## Request

- Base URL: `https://backend.caspr.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://backend.caspr.ai/api/v1/wallet/subscribe`
- Auth: OAuth 2
  - Password
  - Token URL: `token`

Create a new subscription (to_update=False) or change existing plan (to_update=True).

## Request body

- SrcResourcesSchemasWalletSubscribeRequest: Request for /subscribe endpoint. Single endpoint for both new subscription and plan change. - to_update=False: create new subscription (plan_tier, plan_duration, country required). - to_update=True: change existing plan (plan_tier, plan_duration required).
  - `to_update` boolean, required: True to change existing plan, False to create new subscription
  - `idempotency_key` string, required: Unique key for idempotency
  - `plan_tier` string, nullable: PLUS or PRO (required for both create and update)
  - `plan_duration` string, nullable: MONTHLY or YEARLY (required for both create and update)
  - `country` string, nullable: ISO country code e.g. IN, US (required when to_update=False)

## Response `200`

Successful Response

- SrcResourcesSchemasWalletSubscribeResponse: Response with subscription details.
  - `success` boolean
  - `data` object, nullable
  - `subscription_id` string, nullable

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `404`: Not Found
- `422`: Validation Error

---

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