# Billing (/docs/billing)

Daytona provides an overview of your organization's [wallet](#wallet) and [spending](#spending). Daytona uses a pay-as-you-go billing model where you are charged for the resources your sandboxes use, with the guaranteed resources you reserve as a floor. For information on sandbox resource limits and rate limits, see [limits](/docs/limits). Billing is scoped to the organization.

## Sandbox billing [#sandbox-billing]

Daytona meters each sandbox per second for three resources, from the moment the sandbox starts until it is stopped, paused, or deleted. Each resource is priced per hour. macOS sandboxes are not metered; their [Mac reservation](/docs/macos-sandboxes#mac-reservations) is charged instead.

| **Resource** | **Unit**  | **Billed quantity**                                                                          |
| ------------ | --------- | -------------------------------------------------------------------------------------------- |
| **CPU**      | core-hour | The greater of measured CPU time and the guaranteed `cpu` reservation over the same window   |
| **Memory**   | GiB-hour  | The greater of measured memory and the guaranteed `memory_mib` reservation over the same window |
| **Disk**     | GiB-hour  | Measured disk in use                                                                         |

CPU and memory usage within the guarantee is billed at the guarantee; usage above it, up to the sandbox's [resource limits](/docs/limits#sandbox-limits), is billed as measured. A sandbox with a fixed shape, where every limit equals its request, is billed for its full CPU and memory reservation, since usage never exceeds it. Disk is always billed as measured.

Stopped, paused, and deleted sandboxes are not metered for CPU, memory, or disk. [Bucket volume](/docs/volumes) traffic is billed per uploaded GiB, downloaded GiB, and 1,000 requests, independent of sandbox class.

### Pricing dimensions [#pricing-dimensions]

The price of each resource depends on what you requested at create time. Each dimension applies a multiplier to the base price; the multipliers compound. The CPU type multiplier applies to CPU usage only.

| **Dimension**     | **Parameter**   | **Values**                                                                                                                                                 |
| ----------------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Region            | `region`        | Each region's own multiplier; `earth` (`1.0`) is the base price. See [region price multipliers](/docs/regions#list-region-price-multipliers)          |
| Spot              | `spot`          | `false` (`1.0`), `true` (`0.7`)                                                                                                                            |
| CPU type          | `cpu_type`      | Not requested, `zen3`, `arrowlake1`, `graviton`, `graviton3`, `graviton4` (`1.0`); `zen4`, `arrowlake2` (`1.6667`); `zen5`, `zen5c` (`2.3313`) |

A sandbox that omits a hardware preference is billed at the baseline for that dimension, even if placement lands on premium hardware. Forked and restored sandboxes inherit the preferences of their source. See [Linux sandbox parameters](/docs/linux-sandboxes#create-a-linux-sandbox) for how to set these values.

## Plan [#plan]

### Get the plan [#get-the-plan]

Get the plan: the organization's current plan, its limits and entitlements, and any pending change. The plan catalog lists the plans an organization can choose.

<Tabs syncKey="language">
<TabItem label="CLI" icon="seti:shell">

```bash
daytona billing plan get --org ORGANIZATION_ID

# Plan catalog
daytona billing plan list --org ORGANIZATION_ID
```

</TabItem>
<TabItem label="API" icon="seti:json">

```bash
curl 'https://api.daytona.com/orgs/ORGANIZATION_ID/billing/plan' \
  --header 'Authorization: Bearer YOUR_OIDC_TOKEN'

# Plan catalog
curl 'https://api.daytona.com/orgs/ORGANIZATION_ID/billing/plans' \
  --header 'Authorization: Bearer YOUR_OIDC_TOKEN'
```

</TabItem>
</Tabs>

### Change the plan [#change-the-plan]

Change the plan. Self-serve changes move an organization between the Starter and Team plans; the Enterprise plan is arranged with sales. The Team plan has a monthly fee of $250, billed in advance, and includes $100 of credits each month that expire at the end of the billing period. A change to Team applies immediately; a pre-paid organization needs a payment method on file first. A change from Team to Starter takes effect at the end of the billing period and shows as pending until then.

<Tabs syncKey="language">
<TabItem label="CLI" icon="seti:shell">

```bash
# starter or team
daytona billing plan set team --org ORGANIZATION_ID
```

</TabItem>
<TabItem label="API" icon="seti:json">

```bash
curl 'https://api.daytona.com/orgs/ORGANIZATION_ID/billing/plan' \
  --request PUT \
  --header 'Authorization: Bearer YOUR_OIDC_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{ "plan": "team" }'
```

| **Field** | **Type** | **Description** |
| --------- | -------- | --------------- |
| `plan`    | string | Sets the plan: `starter` or `team`. The value `enterprise` returns `400` with `contact_sales`. A change to `team` for a pre-paid organization requires a payment method. |

</TabItem>
</Tabs>

## Wallet [#wallet]

[Daytona Wallet ↗](https://app.daytona.com/dashboard/billing/wallet) is the central hub for managing your organization's wallet, including balances, credit consumption, and payment methods. New organizations are provisioned with the billing provider within a few minutes of creation; until then the wallet shows a provisioning notice.

### Redeem coupon [#redeem-coupon]

Redeem a coupon to add free credits to your wallet. Each coupon can be redeemed once per organization. Coupon credits may carry an expiration date, shown in [credit balances](#credit-balances).

1. Go to [Daytona Wallet ↗](https://app.daytona.com/dashboard/billing/wallet)
2. Navigate to the **Redeem coupon** section
3. Enter the coupon code
4. Click <Button>Redeem</Button>

<Tabs syncKey="language">
<TabItem label="CLI" icon="seti:shell">

```bash
daytona billing coupon redeem COUPON_CODE --org ORGANIZATION_ID
```

</TabItem>
<TabItem label="API" icon="seti:json">

```bash
curl 'https://api.daytona.com/orgs/ORGANIZATION_ID/billing/coupons/redeem' \
  --request POST \
  --header 'Authorization: Bearer YOUR_OIDC_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{ "code": "COUPON_CODE" }'
```

</TabItem>
</Tabs>

### Balance [#balance]

Balance displays the credit balances available to your organization.

| **Field**                 | **Description**                                                           |
| ------------------------- | ------------------------------------------------------------------------- |
| **Total balance**         | The sum of free and paid credits.                                         |
| **Free credits**          | The amount of granted credits, such as coupons or card-connected credits. |
| **Paid credits**          | The amount of purchased credits.                                          |
| **Spent this month**      | Usage charged in the current billing period.                              |
| **Amount due this month** | The open amount of the current invoice, shown only when non-zero.         |

Daytona consumes free credits before paid credits. When both balances are exhausted, the paid balance shows the amount due as a negative number.

1. Go to [Daytona Wallet ↗](https://app.daytona.com/dashboard/billing/wallet)
2. Navigate to the **Balance** section

<Tabs syncKey="language">
<TabItem label="CLI" icon="seti:shell">

```bash
daytona billing wallet --org ORGANIZATION_ID
```

</TabItem>
<TabItem label="API" icon="seti:json">

```bash
curl 'https://api.daytona.com/orgs/ORGANIZATION_ID/billing/wallet' \
  --header 'Authorization: Bearer YOUR_OIDC_TOKEN'
```

```json
{
  "balance_cents": 12500,
  "free_credits_balance_cents": 2500,
  "paid_credits_balance_cents": 10000,
  "total_spent_this_month_cents": 4321,
  "total_amount_due_this_month_cents": 0,
  "currency": "usd",
  "billing_type": "pre-paid",
  "automatic_top_up": { "enabled": true, "threshold_cents": 2000, "target_cents": 10000, "currency": "usd" }
}
```

</TabItem>
</Tabs>

### Credit balances [#credit-balances]

Credit balances itemizes every credit grant and top-up.

| **Field**      | **Description**                      |
| -------------- | ------------------------------------ |
| **Name**       | The grant or top-up.                 |
| **Type**       | Free or paid.                        |
| **Remaining**  | The unspent amount.                  |
| **Granted**    | The original amount.                 |
| **Expires**    | The expiration date, if any.         |
| **Applies to** | The products the credit can pay for. |

1. Go to [Daytona Wallet ↗](https://app.daytona.com/dashboard/billing/wallet)
2. Navigate to the **Credit Balances** section
3. Click <Button>Show</Button>

<Tabs syncKey="language">
<TabItem label="CLI" icon="seti:shell">

```bash
# Paginated; pass the returned next_cursor as --cursor for more rows, or --all for every page
daytona billing balances --org ORGANIZATION_ID --limit 25
```

| **Flag**  | **Type** | **Description**                                                 |
| --------- | -------- | --------------------------------------------------------------- |
| `--limit` | int    | Sets the maximum number of rows. The default is `25`. |

</TabItem>
<TabItem label="API" icon="seti:json">

```bash
# Paginated; follow next_cursor for more rows
curl 'https://api.daytona.com/orgs/ORGANIZATION_ID/billing/balances?limit=25' \
  --header 'Authorization: Bearer YOUR_OIDC_TOKEN'
```

| **Field**   | **Type**  | **Description**                                                      |
| ----------- | --------- | -------------------------------------------------------------------- |
| `limit`     | integer | Sets the maximum number of items, from `1` to `200`. The default is `100`. |
| `cursor`    | string  | Pass the `next_cursor` value of the previous response to read the next page. |

</TabItem>
</Tabs>

### Balance notification [#balance-notification]

Balance notification emails the organization's billing contact when the wallet balance drops below a threshold, or the creator's email when no billing contact is set. The threshold is in cents, from 500 to 5,000,000.

1. Go to [Daytona Wallet ↗](https://app.daytona.com/dashboard/billing/wallet)
2. Navigate to the **Balance notification** section
3. Enable the notification and set the threshold
4. Click <Button>Save</Button>

<Tabs syncKey="language">
<TabItem label="CLI" icon="seti:shell">

```bash
# Threshold in cents
daytona billing balance-notification set --threshold-cents 1000 --org ORGANIZATION_ID

# Billing contact for notifications and receipts
daytona billing contact set --email finance@example.com --org ORGANIZATION_ID

# Read the current rule
daytona billing balance-notification get --org ORGANIZATION_ID

# Read the billing contact
daytona billing contact get --org ORGANIZATION_ID

# Turn off the notification
daytona billing balance-notification delete --org ORGANIZATION_ID
```

<Callout type="note" title="Notes">
- Reading the notification and the billing contact requires the `read:billing` permission.
- Setting or removing them requires the `write:billing` permission.
</Callout>

</TabItem>
<TabItem label="API" icon="seti:json">

```bash
# Threshold in cents
curl 'https://api.daytona.com/orgs/ORGANIZATION_ID/billing/balance-notification' \
  --request PUT \
  --header 'Authorization: Bearer YOUR_OIDC_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{ "threshold_cents": 1000 }'

# Billing contact for notifications and receipts
curl 'https://api.daytona.com/orgs/ORGANIZATION_ID/billing/contact' \
  --request PUT \
  --header 'Authorization: Bearer YOUR_OIDC_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{ "email": "finance@example.com" }'

# Read the current rule: { "enabled": true, "threshold_cents": 1000, "currency": "usd" }
curl 'https://api.daytona.com/orgs/ORGANIZATION_ID/billing/balance-notification' \
  --header 'Authorization: Bearer YOUR_OIDC_TOKEN'

# Read the billing contact. effective_email is the address mail goes to: email, or the creator's email when unset
curl 'https://api.daytona.com/orgs/ORGANIZATION_ID/billing/contact' \
  --header 'Authorization: Bearer YOUR_OIDC_TOKEN'

# Turn off the notification
curl 'https://api.daytona.com/orgs/ORGANIZATION_ID/billing/balance-notification' \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_OIDC_TOKEN'
```

<Callout type="note" title="Notes">
- Reading the notification and the billing contact requires the `read:billing` permission.
- Setting or removing them requires the `write:billing` permission.
</Callout>

</TabItem>
</Tabs>

### Billing information [#billing-information]

Billing information displays the name, email, phone number, and address on file with the payment provider. It is read-only in the dashboard; edit it through the billing portal.

1. Go to [Daytona Wallet ↗](https://app.daytona.com/dashboard/billing/wallet)
2. Navigate to the **Billing info** section
3. Click <Button>Edit</Button> to open the billing portal

<Tabs syncKey="language">
<TabItem label="CLI" icon="seti:shell">

```bash
daytona billing profile --org ORGANIZATION_ID
```

</TabItem>
<TabItem label="API" icon="seti:json">

```bash
curl 'https://api.daytona.com/orgs/ORGANIZATION_ID/billing/profile' \
  --header 'Authorization: Bearer YOUR_OIDC_TOKEN'
```

</TabItem>
</Tabs>

### Payment method [#payment-method]

Payment method connects your wallet to a card, allowing you to add funds to your balance and pay invoices. Payment methods are managed through the hosted billing portal. Personal organizations receive a one-time grant of free credits when the first card is connected, and another when the creator verifies their email address.

1. Go to [Daytona Wallet ↗](https://app.daytona.com/dashboard/billing/wallet)
2. Navigate to the **Payment methods** section
3. Click <Button>Add payment method</Button>, or <Button>Edit</Button> if a card is already on file
4. Follow the prompts in the billing portal

<Tabs syncKey="language">
<TabItem label="CLI" icon="seti:shell">

```bash
daytona billing payment-methods --org ORGANIZATION_ID

# Hosted checkout URL for adding a payment method
daytona billing payment-method-session --org ORGANIZATION_ID

# Hosted billing portal URL for managing payment methods and billing details
daytona billing portal-session --org ORGANIZATION_ID
```

<Callout type="note" title="Notes">
- Listing payment methods requires the `read:billing` permission.
- Opening a payment method session or a billing portal session requires the `write:billing` permission.
</Callout>

</TabItem>
<TabItem label="API" icon="seti:json">

```bash
curl 'https://api.daytona.com/orgs/ORGANIZATION_ID/billing/payment-methods' \
  --header 'Authorization: Bearer YOUR_OIDC_TOKEN'

# Hosted checkout URL for adding a payment method
curl 'https://api.daytona.com/orgs/ORGANIZATION_ID/billing/payment-method-sessions' \
  --request POST \
  --header 'Authorization: Bearer YOUR_OIDC_TOKEN'

# Hosted billing portal URL for managing payment methods and billing details
curl 'https://api.daytona.com/orgs/ORGANIZATION_ID/billing/portal-sessions' \
  --request POST \
  --header 'Authorization: Bearer YOUR_OIDC_TOKEN'
```

<Callout type="note" title="Notes">
- Listing payment methods requires the `read:billing` permission.
- Opening a payment method session or a billing portal session requires the `write:billing` permission.
</Callout>

</TabItem>
</Tabs>

### Automatic top-up [#automatic-top-up]

Automatic top-up adds credits to your wallet when the balance drops below a threshold. Amounts are in cents: the threshold must be at least 1000 cents ($10), and the target must exceed the threshold by at least 1000 cents. Automatic top-up is available for pre-paid organizations and is disabled automatically after a failed payment; update the payment method and enable it again.

1. Go to [Daytona Wallet ↗](https://app.daytona.com/dashboard/billing/wallet)
2. Navigate to the **Automatic top-up** section
3. Add or update the **when balance is low** and **bring balance to** values
4. Click <Button>Save</Button>

<Tabs syncKey="language">
<TabItem label="CLI" icon="seti:shell">

```bash
# Amounts in cents
daytona billing automatic-top-up set --threshold-cents 2000 --target-cents 10000 --org ORGANIZATION_ID

# Read the current rule
daytona billing automatic-top-up get --org ORGANIZATION_ID

# Turn off automatic top-up
daytona billing automatic-top-up delete --org ORGANIZATION_ID
```

<Callout type="note" title="Notes">
- Reading the setting requires the `read:billing` permission.
- Changing or removing the setting requires the `write:billing` permission.
</Callout>

</TabItem>
<TabItem label="API" icon="seti:json">

```bash
# Amounts in cents
curl 'https://api.daytona.com/orgs/ORGANIZATION_ID/billing/automatic-top-up' \
  --request PUT \
  --header 'Authorization: Bearer YOUR_OIDC_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{ "threshold_cents": 2000, "target_cents": 10000 }'

# Read the current rule: { "enabled": true, "threshold_cents": 2000, "target_cents": 10000, "currency": "usd" }
curl 'https://api.daytona.com/orgs/ORGANIZATION_ID/billing/automatic-top-up' \
  --header 'Authorization: Bearer YOUR_OIDC_TOKEN'

# Turn off automatic top-up
curl 'https://api.daytona.com/orgs/ORGANIZATION_ID/billing/automatic-top-up' \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_OIDC_TOKEN'
```

<Callout type="note" title="Notes">
- Reading the setting requires the `read:billing` permission.
- Changing or removing the setting requires the `write:billing` permission.
</Callout>

</TabItem>
</Tabs>

### One time top-up [#one-time-top-up]

One time top-up buys wallet credits by card on a hosted checkout page. The minimum is $10 (1000 cents) and the maximum $999,999.99. A payment method must be on file.

1. Go to [Daytona Wallet ↗](https://app.daytona.com/dashboard/billing/wallet)
2. Navigate to the **One-time top-up** section
3. Select a preset amount or enter a custom amount
4. Click <Button>Top up</Button>
5. Complete the payment on the checkout page

<Tabs syncKey="language">
<TabItem label="CLI" icon="seti:shell">

```bash
# Amount in cents; returns a checkout URL
daytona billing top-up 5000 --org ORGANIZATION_ID
```

</TabItem>
<TabItem label="API" icon="seti:json">

```bash
# Amount in cents; returns a checkout URL
curl 'https://api.daytona.com/orgs/ORGANIZATION_ID/billing/top-up-sessions' \
  --request POST \
  --header 'Authorization: Bearer YOUR_OIDC_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{ "amount_cents": 5000 }'
```

</TabItem>
</Tabs>

### Invoices [#invoices]

Invoices are generated per billing period and for each top-up.

| **Field**    | **Description**                  |
| ------------ | -------------------------------- |
| **Number**   | The invoice identifier.          |
| **Date**     | The date the invoice was issued. |
| **Due date** | The date the invoice is due.     |
| **Total**    | The amount of the invoice.       |
| **Status**   | The status of the invoice.       |
| **Type**     | The type of the invoice.         |

An unpaid invoice shows a warning with a **Pay** button. If a pre-paid organization leaves an invoice unpaid past the grace period, the organization is [suspended](#suspension) until it is paid. Post-paid organizations with a contract are never suspended for unpaid invoices.

1. Go to [Daytona Wallet ↗](https://app.daytona.com/dashboard/billing/wallet)
2. Navigate to the **Invoices** section
3. Click <Button>View</Button> to open the invoice PDF, or <Button>Pay</Button> for an open invoice

<Tabs syncKey="language">
<TabItem label="CLI" icon="seti:shell">

```bash
daytona billing invoices --org ORGANIZATION_ID

daytona billing invoices --unpaid --org ORGANIZATION_ID

daytona billing invoice pdf INVOICE_ID --org ORGANIZATION_ID --out invoice.pdf

# Payment URL for an open invoice
daytona billing invoice payment-session INVOICE_ID --org ORGANIZATION_ID
```

<Callout type="note" title="Notes">
- Listing invoices and downloading their PDFs requires the `read:billing` permission.
- Paying an invoice requires the `write:billing` permission.
</Callout>

</TabItem>
<TabItem label="API" icon="seti:json">

```bash
curl 'https://api.daytona.com/orgs/ORGANIZATION_ID/billing/invoices' \
  --header 'Authorization: Bearer YOUR_OIDC_TOKEN'

curl 'https://api.daytona.com/orgs/ORGANIZATION_ID/billing/invoices?unpaid=true' \
  --header 'Authorization: Bearer YOUR_OIDC_TOKEN'

curl 'https://api.daytona.com/orgs/ORGANIZATION_ID/billing/invoices/INVOICE_ID/pdf' \
  --header 'Authorization: Bearer YOUR_OIDC_TOKEN' \
  --output invoice.pdf

# Payment URL for an open invoice
curl 'https://api.daytona.com/orgs/ORGANIZATION_ID/billing/invoices/INVOICE_ID/payment-sessions' \
  --request POST \
  --header 'Authorization: Bearer YOUR_OIDC_TOKEN'
```

<Callout type="note" title="Notes">
- Listing invoices and downloading their PDFs requires the `read:billing` permission.
- Paying an invoice requires the `write:billing` permission.
</Callout>

</TabItem>
</Tabs>

### Charges [#charges]

Charges displays all payment attempts on your organization, including failed attempts. A receipt PDF is available for each successful charge.

| **Field**       | **Description**                    |
| --------------- | ---------------------------------- |
| **Date**        | The date the charge was attempted. |
| **Description** | The description of the charge.     |
| **Amount**      | The amount of the charge.          |
| **Status**      | The status of the charge.          |

<Tabs syncKey="language">
<TabItem label="CLI" icon="seti:shell">

```bash
daytona billing charges --org ORGANIZATION_ID
```

</TabItem>
<TabItem label="API" icon="seti:json">

```bash
curl 'https://api.daytona.com/orgs/ORGANIZATION_ID/billing/charges' \
  --header 'Authorization: Bearer YOUR_OIDC_TOKEN'

curl 'https://api.daytona.com/orgs/ORGANIZATION_ID/billing/charges/CHARGE_ID/pdf' \
  --header 'Authorization: Bearer YOUR_OIDC_TOKEN' \
  --output receipt.pdf
```

</TabItem>
</Tabs>

## Spending [#spending]

[Daytona Spending ↗](https://app.daytona.com/dashboard/spending) provides a summary of resource usage for the selected project and the organization's billing periods. Reading usage requires the spending read [permission](/docs/api-keys#scopes).

### Resource usage [#resource-usage]

Resource usage summarizes the selected project's measured usage over a date range.

| **Metric**      | **Description**                  |
| --------------- | -------------------------------- |
| **CPU**         | Total CPU time, in core-seconds. |
| **Memory**      | Total memory, in GiB-hours.      |
| **Network**     | Total bytes sent and received.   |
| **Disk (peak)** | The highest disk usage observed. |

1. Go to [Daytona Spending ↗](https://app.daytona.com/dashboard/spending)
2. Select a project and a date range

<Tabs syncKey="language">
<TabItem label="API" icon="seti:json">

```bash
# Hourly usage for the project over the last day (default)
curl 'https://api.daytona.com/usage/report' \
  --header 'Authorization: Bearer YOUR_API_KEY'

# Daily usage for a date range
curl 'https://api.daytona.com/usage/report?start_at=2026-09-01T00:00:00Z&end_at=2026-09-08T00:00:00Z&resolution=day' \
  --header 'Authorization: Bearer YOUR_API_KEY'
```

| **Field**    | **Type** | **Description**                                                                                                  |
| ------------ | -------- | ---------------------------------------------------------------------------------------------------------------- |
| `start_at` | string | Sets the inclusive start of the window as an RFC 3339 timestamp. The default is 24 hours before `end_at`. |
| `end_at` | string | Sets the exclusive end of the window as an RFC 3339 timestamp. The default is now. |
| `resolution` | string | Sets the resolution, `hour` or `day`. The default is `hour`. |

</TabItem>
</Tabs>

### Usage timeline [#usage-timeline]

Usage timeline charts one metric over the selected range: CPU, memory, or network.

### Per-sandbox usage [#per-sandbox-usage]

Per-sandbox usage displays the same measurements broken down by sandbox: **Sandbox**, **CPU core-s**, **Memory GiB-h**, **Network**, and **Disk (peak)**.

<Tabs syncKey="language">
<TabItem label="CLI" icon="seti:shell">

```bash
# Live usage for one sandbox
daytona sandbox usage SANDBOX_ID

# Usage history for one sandbox, per minute; the CLI has no hourly resolution
daytona sandbox usage SANDBOX_ID --history
```

</TabItem>
<TabItem label="API" icon="seti:json">

```bash
# Live usage for one sandbox
curl 'https://api.daytona.com/sandboxes/SANDBOX_ID/usage' \
  --header 'Authorization: Bearer YOUR_API_KEY'

# Usage history for one sandbox, per minute or per hour
curl 'https://api.daytona.com/sandboxes/SANDBOX_ID/usage/history?resolution=hour' \
  --header 'Authorization: Bearer YOUR_API_KEY'
```

| **Field**    | **Type** | **Description**                                                         |
| ------------ | -------- | ----------------------------------------------------------------------- |
| `resolution` | string | Sets the resolution, `minute` or `hour`. The default is `minute`. |
| `start_at` | string | Sets the inclusive start of the window as an RFC 3339 timestamp. The default is 24 hours before `end_at`. |
| `end_at` | string | Sets the exclusive end of the window as an RFC 3339 timestamp. The default is now. |

</TabItem>
</Tabs>

### Billing period [#billing-period]

Billing period shows the amount owed per product for the current and past periods.

- **Metric**, **Product**, **Units**, **Cost**: the current period's charges per resource and sandbox class
- **Period**, **Issued**, **Total**: the closed past periods

<Tabs syncKey="language">
<TabItem label="CLI" icon="seti:shell">

```bash
# Current billing period
daytona billing usage --org ORGANIZATION_ID

# Billing periods, newest first
daytona billing usage-periods --org ORGANIZATION_ID --limit 3
```

| **Flag**  | **Type** | **Description** |
| --------- | -------- | --------------- |
| `--limit` | int    | Sets the maximum number of periods. The default is `12`. |

</TabItem>
<TabItem label="API" icon="seti:json">

```bash
# Billing periods, newest first; the open period is the current one
curl 'https://api.daytona.com/orgs/ORGANIZATION_ID/billing/usage-periods?limit=3' \
  --header 'Authorization: Bearer YOUR_OIDC_TOKEN'
```

```json
{
  "usage_periods": [
    {
      "status": "open",
      "start_at": "2026-09-01T00:00:00Z",
      "end_at": "2026-10-01T00:00:00Z",
      "issued_at": "2026-10-01T00:00:00Z",
      "currency": "usd",
      "amount_cents": 12345,
      "total_amount_cents": 12400,
      "taxes_amount_cents": 0,
      "charges": [
        { "name": "CPU · Linux VM", "quantity": 342.9, "total_cents": 12345 }
      ]
    }
  ],
  "next_cursor": null
}
```

| **Field** | **Type**  | **Description** |
| --------- | --------- | --------------- |
| `limit`   | integer | Sets the maximum number of periods. |
| `cursor`  | string  | Reads the next page. Pass the `next_cursor` value of the previous response. |

</TabItem>
</Tabs>

## Suspension [#suspension]

Daytona suspends a pre-paid organization when its balance is depleted or when an invoice stays unpaid past the grace period. While suspended, creating, starting, resuming, restoring, and forking sandboxes fails with HTTP 402 and an organization suspended error; already running sandboxes are not affected. The suspension lifts automatically once its cause is resolved: a top-up or coupon that restores the balance, or payment of the unpaid invoice. The dashboard shows the suspension and its reason on the wallet page.

## Permissions [#permissions]

Billing is scoped to the organization. Access is governed by two organization permissions, which you can grant through an [organization role](/docs/organizations#roles), and usage reports use the spending permission. Billing requests require a signed-in user token. An [organization API key](/docs/api-keys#organization-api-keys) can hold the billing permissions, but they only authorize it to list the [region price multipliers](/docs/regions#list-region-price-multipliers).

Reading the usage of a single sandbox requires the permission to read sandboxes.

| **Permission**      | **Grants**                                                                                             |
| ------------------- | ------------------------------------------------------------------------------------------------------ |
| **`read:billing`**  | Get the plan, wallet, balances, invoices, charges, payment methods, and billing settings               |
| **`write:billing`** | Change the plan, redeem coupons, top up, pay invoices, and change payment methods and billing settings |
| **`read:spending`** | Read resource usage and the budget of the project                                                      |
