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

# Invoicing

> Run Orgo accounts for your clients, and cover them or bill them monthly.

Invoicing lets you run an Orgo account for each of your clients or users from your own app. Each one has its own computers and its own API key. They never sign up to Orgo.

For each client you choose who pays:

* **You.** Their computers count against your plan and their AI uses your credits, like your own workspaces.
* **Your client.** They subscribe through a payment link at your price, with an optional one-time setup fee. Orgo keeps only the client's computer cost, and Stripe pays the rest to your bank after its card fee.

<Note>
  Invoicing is available to approved accounts. Contact Orgo to turn it on. You manage it in **Settings → Invoicing**, or with the [Clients API](/api-reference/clients/create).
</Note>

## How it works

A client is a workspace you own, plus an API key that can reach only that workspace. Use the key in your app like any Orgo key: create and control computers, run the Computer Use API, read files. It cannot create workspaces, keys, or clients, and it cannot reach your other workspaces. There is no login: your app is how your client reaches Orgo. Because you own the workspace, it does not appear to your client anywhere, and their computers stay out of your own workspace list.

## Add a client

```bash theme={null}
curl -X POST https://www.orgo.ai/api/v1/accounts \
  -H "Authorization: Bearer $ORGO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "external_id": "user_123", "name": "Acme" }'
```

The response includes `api_key`. It is shown once, so store it with your user. Use your account-wide key to manage clients. A client's own key gets `403` here.

| Field | Type | Notes |
| - | - | - |
| `external_id` | string | Required. Your id for this client, unique among your clients. |
| `name` | string | Optional. Shown in Settings. |
| `max_computers` | integer | Optional. The most computers they can have. |
| `monthly_ai_cap_usd` | number | Optional. Their AI stops at this amount each month. |

## Manage clients

| Method | Path | Does |
| - | - | - |
| `GET` | `/api/v1/accounts` | Active clients, newest first. Query: `search`, `status=closed`, `limit` (up to 200), `before` (the `next` cursor). Returns `accounts`, `next`, `total`, and `collecting`. |
| `GET` | `/api/v1/accounts/{id}` | One client, with this month's usage and its computers. |
| `PATCH` | `/api/v1/accounts/{id}` | Change `name`, `max_computers`, or `monthly_ai_cap_usd`. `null` removes a limit. |
| `POST` | `/api/v1/accounts/{id}/key` | A new key. The old one stops working. |
| `DELETE` | `/api/v1/accounts/{id}` | Close the client. Their key stops working. Delete their computers first, or this returns `409`. |

## Transfer a client

When the build is done, give it to your client. Send a link to their email, and once they accept it, signed in to their own Orgo account (or a new one), the workspace, its computers, and its API key are theirs:

```bash theme={null}
curl -X POST https://www.orgo.ai/api/v1/accounts/$ACCOUNT_ID/transfer \
  -H "Authorization: Bearer $ORGO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "email": "it@acme.com" }'
```

* Whatever you built on the key keeps working. It runs on their plan and their AI credits from then on, and they can replace the key whenever they like.
* You stay on as an admin, so you can keep working on it until they remove you.
* Any billing through you ends: they pay Orgo directly.
* If their plan can't run the workspace's computers yet, they pick one before accepting.

The link works for 14 days. Sending again replaces it, and `DELETE /api/v1/accounts/{id}/transfer` withdraws it. A pending transfer shows as `transfer` on the client. Once accepted, the client's `status` is `transferred`.

## Bill a client

Set up payouts once in **Settings → Invoicing**. Stripe hosts the bank and identity details. Then send a client a payment link:

```bash theme={null}
curl -X POST https://www.orgo.ai/api/v1/accounts/$ACCOUNT_ID/billing \
  -H "Authorization: Bearer $ORGO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "email": "billing@acme.com", "price_usd": 250, "ai_usd": 40, "setup_fee_usd": 2500 }'
```

Your client gets an email from your name with a link to subscribe. The checkout carries your business name, and they need no Orgo account. The setup fee is charged once, with the first month.

`ai_usd` is optional: a monthly amount of AI your client pays for at cost, shown as its own line on their invoice. Each paid month adds it to your credits and sets the client's monthly AI cap to it, so their AI stays within what they paid for.

| Method | Path | Does |
| - | - | - |
| `GET` | `/api/v1/accounts/{id}/billing` | `billing`, or `null` while you pay. `status` is `sent`, `active`, or `past_due`. |
| `POST` | `/api/v1/accounts/{id}/billing` | Send the link. Body: `email`, `price_usd`, optional `ai_usd` and `setup_fee_usd`. |
| `PATCH` | `/api/v1/accounts/{id}/billing` | A new `price_usd` or `ai_usd` (0 removes AI). A paying client moves to it from their next invoice. An unpaid link is replaced at the new price. |
| `POST` | `/api/v1/accounts/{id}/billing/resend` | Email the payment link again. |
| `GET` | `/api/v1/accounts/{id}/billing/payments` | Recent payments: `id`, `date`, `amount_usd`, and `status` (`paid`, `refunded`, `partly_refunded`, `open`, `failed`). |
| `POST` | `/api/v1/accounts/{id}/billing/payments/{payment_id}/refund` | Refund a payment in full. Orgo returns its share and takes back that month's AI credits. |
| `DELETE` | `/api/v1/accounts/{id}/billing` | Stop billing. A paid month runs to its end; an unpaid link stops at once. Add `?now=true` to end it immediately. |

The price must cover the client's computer cost. While a client pays you, their computers do not count against your plan, and they cannot add or resize computers past what their price covers. If a payment fails for good, the client returns to your plan and you get an email.

## What you earn

Orgo keeps only the client's monthly computer cost, plus any AI amount, which comes back to you as credits. Stripe's card fee (2.9% + 30¢) comes out of your side, as it would on any payment you take. Everything else is yours. For example, a client who pays $250 a month for computers that cost $50 sends Orgo $50, Stripe $7.55, and you \$192.45, plus any setup fee.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.