---
title: "Update subscription payment method"
method: POST
path: "/api/v1/wallet/subscription/update-payment-method"
tags: ["Wallet"]
---

# Update subscription payment method

`POST /api/v1/wallet/subscription/update-payment-method`

## 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/subscription/update-payment-method`
- Auth: OAuth 2
  - Password
  - Token URL: `token`

Cancel current subscription and create a new one with updated payment method at cycle end

## Request body

- UpdatePaymentMethodRequest: Request to update subscription payment method.
  - `subscription_id` string, required: Current subscription ID
  - `cancel_at_cycle_end` boolean: Cancel at cycle end (recommended) or immediately

## Response `200`

Successful Response

- UpdatePaymentMethodResponse: Response for payment method update.
  - `success` boolean, required
  - `message` string, required
  - `data` object, nullable
  - `error` string, nullable

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `404`: Not Found
- `422`: Validation Error
- `500`: Internal Server 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)
