Skip to main content
POST
/
account
/
subscription
/
cancel
Cancel subscription
curl --request POST \
  --url https://api.veryfront.com/account/subscription/cancel \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "subscription": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "server_usage": 123,
    "sandbox_usage": 123,
    "server_usage_details": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "short_id": "<string>",
        "environment_ids": [
          "3c90c3cc-0d44-4b50-8888-8dd25736052a"
        ],
        "environments": [
          {
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "name": "<string>",
            "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "project_name": "<string>",
            "project_slug": "<string>"
          }
        ]
      }
    ],
    "line_items": [
      {
        "quantity": 123,
        "unit_amount": 123,
        "currency": "<string>"
      }
    ],
    "status": "<string>",
    "current_period_start": "<string>",
    "current_period_end": "<string>",
    "expires_at": "<string>",
    "canceled_at": "<string>",
    "created_at": "<string>"
  },
  "error": "<string>"
}

Authorizations

Authorization
string
header
required

Use a JWT bearer token or a Veryfront API key in the Authorization header.

Response

Subscription cancelled

success
boolean
required

Whether cancellation succeeded

subscription
object
error
string | null

Cancellation error message, when present