Cua Cloud billing
The Billing row in Settings and the out-of-credit notice on a refused cloud Space.
The Billing row in Settings and the out-of-credit notice on a refused cloud Space.
These APIs are part of the Cua Spaces app export for building Spaces UIs. They are source-available under FSL-1.1-MIT and ship for Swift only (import CuaSpacesFFI); the Rust tab shows the cua-spaces-ffi crate they come from. The open source SDK packages for Python, TypeScript and Kotlin do not include them.
The apps take no payment details: the website handles credit and cards. app_billing_status turns Fleet.billing_status into the core's AppBillingStatus, which Settings shows as the credit left and "Manage billing" (the website billing page). A cloud Space that Fleet refuses for want of credit (CuaError::CloudCreditExhausted) shows AppCreditNotice: one line and "Add credit", which opens the same page. Local Spaces never depend on it.
AppCreditNotice record#| Field | Type | Default | Description |
|---|---|---|---|
text | String | OUT_OF_CREDIT. | |
button | String | ADD_CREDIT. | |
url | String | The website billing page. |
AppBillingCard record#| Field | Type | Default | Description |
|---|---|---|---|
brand | String | visa, mastercard, ... | |
last4 | String | Last four digits. |
AppBillingCredit record#| Field | Type | Default | Description |
|---|---|---|---|
balance_usd_cents / balanceUsdCents | i64 | What is left, US cents. |
AppBillingStatus record#Returned by app_billing_status.
| Field | Type | Default | Description |
|---|---|---|---|
billing_enabled / billingEnabled | bool | Billing is on for this account (off: Settings shows no Billing row). | |
card | Option<AppBillingCard> | The saved default card. | |
credit | Option<AppBillingCredit> | The account's credit, when it has any. | |
billing_url / billingUrl | Option<String> | The website billing page (credit, cards, plans). |
app_billing_status#The SDK's billing status as the app core takes it (Settings' Billing row).
func appBillingStatus(status: FleetBillingStatus) -> AppBillingStatus| Parameter | Type | Default |
|---|---|---|
status | FleetBillingStatus | required |
Returns AppBillingStatus