> ## Documentation Index
> Fetch the complete documentation index at: https://docs.equa.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# Billing Endpoints

> Subscription management, payment profiles, and billing operations via Chargify

> **Source:** `equa-server/modules/api/src/endpoints/billing-endpoints.ts`

# Billing Endpoints

Endpoints for managing subscriptions, payment profiles, and billing operations. Equa uses **Chargify (Maxio)** as the billing provider. All billing data is accessed through the Chargify API via these server-side endpoints.

All billing endpoints require authentication. Most require `canEditOrganizationBilling` or `canEditEntityBilling` permission.

## Products

### List Products

```
GET /v1/billing/product
```

| Field | Value    |
| ----- | -------- |
| Auth  | Required |

List all available Chargify product plans.

***

### Get Member Pricing

```
GET /v1/billing/member/pricing
```

| Field | Value    |
| ----- | -------- |
| Auth  | Required |

Get the pricing tiers for member-based billing components.

***

## Subscriptions

### Get Organization Subscriptions

```
GET /v1/organization/:organization/subscription
```

| Field      | Value                        |
| ---------- | ---------------------------- |
| Auth       | Required                     |
| Permission | `canEditOrganizationBilling` |

List all subscriptions for an organization.

***

### Create Subscription

```
POST /v1/organization/:organization/subscription
```

| Field      | Value                        |
| ---------- | ---------------------------- |
| Auth       | Required                     |
| Permission | `canEditOrganizationBilling` |

Create a new subscription for an organization.

***

### Preview Subscription

```
POST /v1/organization/:organization/subscription/preview
```

| Field      | Value                        |
| ---------- | ---------------------------- |
| Auth       | Required                     |
| Permission | `canEditOrganizationBilling` |

Preview the cost of a subscription purchase before committing.

***

### Cancel Subscription

```
DELETE /v1/organization/:organization/subscription/:subscription
```

| Field      | Value                        |
| ---------- | ---------------------------- |
| Auth       | Required                     |
| Permission | `canEditOrganizationBilling` |

Cancel an organization's subscription.

***

### Get Organization Features

```
GET /v1/organization/:organization/features
```

| Field      | Value                 |
| ---------- | --------------------- |
| Auth       | Required              |
| Permission | `canViewOrganization` |

Get the feature set enabled for the organization based on its subscription plan.

***

### Get Transactions

```
GET /v1/organization/:organization/billing/transaction
```

| Field      | Value                        |
| ---------- | ---------------------------- |
| Auth       | Required                     |
| Permission | `canEditOrganizationBilling` |

List billing transactions for an organization.

***

## Promo Codes

### Validate Promo Code

```
POST /v1/promo/validate
```

| Field | Value    |
| ----- | -------- |
| Auth  | Required |

Validate a promotional code and return discount details.

**Request:**

```json theme={null}
{
  "code": "PROMO2025"
}
```

***

## Payment Profiles

Payment profiles are now scoped to entities (not organizations). The organization-scoped endpoints are deprecated.

### Create Payment Profile

```
POST /v1/entity/:entity/payment/profile
```

| Field      | Value                  |
| ---------- | ---------------------- |
| Auth       | Required               |
| Permission | `canEditEntityBilling` |

Create a new payment profile (credit card or bank account) for an entity.

***

### List Payment Profiles

```
GET /v1/entity/:entity/payment/profile
```

| Field      | Value                  |
| ---------- | ---------------------- |
| Auth       | Required               |
| Permission | `canEditEntityBilling` |

List all payment profiles for an entity.

***

### Update Payment Profile

```
PUT /v1/entity/:entity/payment/profile/:profile
```

| Field      | Value                  |
| ---------- | ---------------------- |
| Auth       | Required               |
| Permission | `canEditEntityBilling` |

***

### Set Default Payment Profile

```
PUT /v1/entity/:entity/payment/profile/:profile/default
```

| Field      | Value                  |
| ---------- | ---------------------- |
| Auth       | Required               |
| Permission | `canEditEntityBilling` |

Set a payment profile as the default for the entity.

***

### Delete Payment Profile

```
DELETE /v1/entity/:entity/payment/profile/:profile
```

| Field      | Value                  |
| ---------- | ---------------------- |
| Auth       | Required               |
| Permission | `canEditEntityBilling` |

***

## Adjustments

### Create Adjustment

```
POST /v1/subscriptions/:subscription/adjustments
```

| Field | Value    |
| ----- | -------- |
| Auth  | Required |

Create a billing adjustment on a subscription (credits, charges).
