> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.videogen.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.videogen.io/_mcp/server.

# Cancel unpaid credit purchase

POST https://api.videogen.io/v1/billing/orders/{orderId}/cancel
Content-Type: application/json

Void an unpaid order. If payment already settled, return its paid outcome; cancellation does not refund a settled payment.

Reference: https://docs.videogen.io/rest-api-reference/billing/cancel-billing-order

## Authentication

- `Authorization` header (bearer token, required) — API key from [app.videogen.io/api](https://app.videogen.io/api). The full key is only shown once when you create it.

## Request

### Path parameters

- `orderId` (string, required)

## Response

### 200

Current account or order state.

- `orderId` (string, required)
- `state` (enum, required)
  - Allowed values: `requires_approval`, `requires_action`, `processing`, `paid_pending_fulfillment`, `fulfilled`, `failed`, `canceled`, `expired`
- `revision` (integer, required)
- `teamId` (string, required)
- `teamName` (string, required)
- `seller` (enum, required)
  - Allowed values: `VideoGen`
- `product` (enum, required)
  - Allowed values: `credits`
- `credits` (integer, required)
- `currency` (string, required)
- `subtotalMinor` (integer, required)
- `discountMinor` (integer, required)
- `taxMinor` (integer, required)
- `feesMinor` (integer, required)
- `totalMinor` (integer, required)
- `expiresAt` (integer, required) — Unix seconds when this quote expires.
- `termsVersion` (string, required)
- `refundTerms` (string, required)
- `refundStatus` (enum, required)
  - Allowed values: `none`, `requested`, `processing`, `succeeded`, `failed`
- `receiptUrl` (string, required, nullable)
- `retryGuidance` (string, required)
- `paymentHandler` (map from string to any, required) — Seller payment handler and merchant identity for a compatible native wallet. This does not attest to host acceptance.
- `verificationUrl` (string, optional, nullable) — Secure VideoGen verification continuation when required. Sign in as the purchaser on the same team. This is not a checkout link.

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "orderId": "string",
  "state": "requires_approval",
  "revision": 1,
  "teamId": "string",
  "teamName": "string",
  "seller": "VideoGen",
  "product": "credits",
  "credits": 1,
  "currency": "string",
  "subtotalMinor": 1,
  "discountMinor": 1,
  "taxMinor": 1,
  "feesMinor": 1,
  "totalMinor": 1,
  "expiresAt": 1,
  "termsVersion": "string",
  "refundTerms": "string",
  "refundStatus": "none",
  "receiptUrl": "string",
  "retryGuidance": "string",
  "paymentHandler": {},
  "verificationUrl": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api.videogen.io/v1/billing/orders/orderId/cancel"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```