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

# Pricing And Payments

> Charge your app users, understand checkout, payouts, Capsule's platform fee, and your workspace billing.

You can charge external users for access to the apps you build on Capsule. Capsule handles checkout and access, then takes a platform fee from app sales. Separately, your workspace pays Capsule for platform subscription and runtime usage.

At the SDK level, selling an app is simple: set a price on the app, deploy it, and connect payouts so Capsule can send you your share.

## Sell an app

Set `price` and `pricing_type` on `cpsl.App`.

```python theme={null}
import cpsl

app = cpsl.App(
    name="support-ops",
    image=cpsl.Image(python_packages=["openai"]),
    price=1500,
    pricing_type="monthly",
)
```

`price` is in cents. `1500` means `$15.00`.

Supported pricing types:

| Value        | Meaning                                    |
| ------------ | ------------------------------------------ |
| `"one_time"` | The user pays once for app access          |
| `"monthly"`  | The user subscribes monthly for app access |

If `price` is `0`, the app is treated as free.

## Apply pricing changes

Pricing is part of the app definition. The next time you deploy the app, Capsule applies the current `price` and `pricing_type` values.

The deploy output also shows the configured price.

## User checkout

When an external user opens your paid app without access, Capsule starts a checkout flow.

The hosted app redirects the user to Stripe Checkout. After success, Capsule grants that user access to your app.

If you need to create a checkout link from a script or backend service, use `cpsl.Client.create_checkout(...)`.

## Access after payment

Paid apps still use normal app-scoped identity.

After checkout:

* the external user signs into the app user pool
* Capsule records access for that app
* `session.user` and `ctx.user` identify the signed-in app user
* `access="authenticated"` pages continue to use the same auth gate

Pricing controls whether the user can enter the app. It does not replace app auth or page/data access checks.

## Your payouts

App sales use Stripe Connect to pay you out.

Set up payouts from the Capsule console under **Settings → Usage & Billing**.

Once onboarding is complete, new app checkout sessions can route your share to your connected payout account and apply Capsule's platform fee during checkout.

## Platform fee

Capsule takes a platform fee when external users pay for your app.

Current platform fee:

```text theme={null}
10%
```

For a `$15.00` app sale:

| Amount        | Value    |
| ------------- | -------- |
| Gross payment | `$15.00` |
| Platform fee  | `$1.50`  |
| Your amount   | `$13.50` |

The app detail page and payment views should show the gross payment, Capsule fee, and your net amount. App sales currently settle in USD.

## Payout states

In the payments UI, payouts are shown in a few practical states:

| Status           | Meaning                                                              |
| ---------------- | -------------------------------------------------------------------- |
| Paid out         | The payment has been routed or transferred to your connected account |
| Needs onboarding | You have not completed payout onboarding yet                         |
| In progress      | Capsule is attempting to settle the payout                           |
| Failed           | Capsule could not complete the payout transfer                       |

If users buy your app before you finish Connect onboarding, those payments can remain pending until your workspace is ready for settlement.

## Settle pending payouts

Pending payouts can be settled after Connect is enabled. Use **Settings → Usage & Billing** to finish onboarding and settle eligible pending payouts.

Settlement transfers your net amount to your connected account and updates each payout as paid out or failed.

## App payment reporting

You can inspect app payments from the app detail page. The payments view is intended to answer:

* who paid for the app
* how much they paid
* whether the payment was one-time or monthly
* how much Capsule kept as the platform fee
* how much you earned
* whether the payout is complete, pending, or failed

## Platform billing

Platform billing is separate from app sales. App sales are your users paying you. Platform billing is your workspace paying Capsule.

You can manage your Capsule subscription and runtime usage from **Settings → Usage & Billing**.

From there you can:

* see workspace usage
* start or manage your Capsule subscription
* open the billing portal
* cancel a subscription
* sync billing state
* manage payout onboarding

Workspace plan statuses:

| Status      | Meaning                           |
| ----------- | --------------------------------- |
| `trial`     | Trial workspace                   |
| `active`    | Active paid workspace             |
| `past_due`  | Payment is overdue                |
| `cancelled` | Subscription was cancelled        |
| `expired`   | Trial or plan is no longer active |

## Runtime usage

Runtime usage is tracked separately from app sale revenue.

Use **Settings → Usage & Billing** for workspace billing insights. Use the app detail page for per-app usage views.

## UI map

Capsule exposes payment features in two main places:

| UI surface                 | What it shows                                                |
| -------------------------- | ------------------------------------------------------------ |
| Hosted subdomain app       | Paid app checkout prompts for users without access           |
| App detail page            | App price, checkout action, payments tab                     |
| Settings → Usage & Billing | Platform subscription, runtime usage, Stripe Connect payouts |

## Notes

* App sale checkout uses Stripe Checkout and can create one-time or subscription sessions depending on `pricing_type`.
* When payout onboarding is complete, Capsule can route your share to your connected payout account.
* If onboarding is incomplete, app sale payouts can remain pending until payouts are enabled.

## Related

* [Deploy An App](/build/deploy-an-app)
* [App API Reference](/reference/app-api)
* [CLI Reference](/reference/cli)
