Skip to content

Billing and usage ​

We bill packages through orders, accounts, wallets, and invoices. This page covers the public customer billing operations. See shared conventions for authentication, pagination, and errors.

Monetary amounts use micro-USD. One US dollar is 1000000 micro-USD. Identifiers are strings, including numeric identifiers.

For user-scoped routes, use @me or your own user ID as uid. Staff can address another user. Reads of individual invoices, payments, and payment methods require their account owner or staff. Workspace orders and subjects require workspace membership to read. Placing or cancelling an order requires the workspace admin role. Approving an order requires its workspace owner or staff. Cancelling a delivered subject or moving its renewal day requires its account owner or staff.

All operations below return 200 OK, including gateway webhook ingestion and commands that start payment processing. They do not return a workflow envelope. A pending payment still needs gateway settlement.

Each paginated endpoint accepts the optional limit, page, sort, dir, after, and before query parameters from pagination. Its response has items, total, limit, page, has_next, has_previous, and optional nullable after and before cursors. Response field tables mark required properties and show null wherever accepted.

Catalog ​

List packages ​

GET/v1/packagesList packages

Keyset-paginated listing of the packages on sale, newest first. Each item carries its offers, its rate card and its cheapest price, the same as the package detail.

Query parameters

NameTypeRequiredDescription
qstringnoQuick search by package code or name
resource_kindstring[]noKinds to filter Values: SERVER, IP_ADDRESS.
charge_basisstring[]noCharge bases to filter Values: FIXED, METERED.

Supports pagination.

Returns 200 OK with a paged envelope of PackageDetailResponse objects.

Get a package ​

GET/v1/packages/{code}Get a package

Returns a package by code with its offers, its rate card and its cheapest price.

Path parameters

NameTypeRequiredDescription
codestringyesPackage code

Returns 200 OK with PackageDetailResponse.

Errors

  • 404: No package with that code

List a package's moves ​

GET/v1/packages/{code}/transitionsList a package's moves

Keyset-paginated listing of the packages a subject on this package may upgrade or downgrade to, newest first. Each item carries its direction and the target package in the same shape as a package list item. A package with no offered moves returns an empty page. Moving to the subject's own package, to choose new values for its open fields, is always possible and is not listed.

Path parameters

NameTypeRequiredDescription
codestringyesPackage code

Query parameters

NameTypeRequiredDescription
directionstring[]noDirections to filter Values: UPGRADE, DOWNGRADE.

Supports pagination.

Returns 200 OK with a paged envelope of PackageTransitionResponse objects.

Errors

  • 404: No package with that code

Get a rate card ​

GET/v1/rate-cards/{code}Get a rate card

Returns a rate card by code with its priced parts.

Path parameters

NameTypeRequiredDescription
codestringyesRate card code

Returns 200 OK with RateCardDetailResponse.

Errors

  • 404: No rate card with that code

Orders ​

Choose a package and inspect its pinned and open fields before ordering. The example assumes vps-small exists and needs no additional open-field values. Supply every required open field from its current catalog offer. A server purchase also needs a template or backup image. An upgrade accepts one item and rejects provisioning properties.

Get an order ​

GET/v1/orders/{oid}Get an order

Returns an order with its items and their part lines.

Path parameters

NameTypeRequiredDescription
oidstringyesOrder id

Returns 200 OK with OrderDetailResponse.

Errors

  • 403: Not a member of the order's workspace
  • 404: No order with that id

Approve an order ​

POST/v1/orders/{oid}/approveApprove an order

Approves an order in AWAITING_APPROVAL and collects it from the workspace owner's account. collection tells if a stored payment method is being charged or if a checkout is necessary for the remaining amount.

Path parameters

NameTypeRequiredDescription
oidstringyesOrder id

Returns 200 OK with CreateOrderResponse.

Errors

  • 403: Not the owner of the order's workspace
  • 404: No order with that id
  • 409: The order is not awaiting approval

Cancel an order ​

POST/v1/orders/{oid}/cancelCancel an order

Cancels a DRAFT, AWAITING_APPROVAL or AWAITING_PAYMENT order, voids its invoice and returns the wallet credit paid toward it. Refused while a payment for the invoice waits for confirmation and after the invoice is paid. Cancelling a cancelled order changes nothing.

Path parameters

NameTypeRequiredDescription
oidstringyesOrder id

Returns 200 OK with OrderView.

Errors

  • 403: Not an admin of the order's workspace
  • 404: No order with that id
  • 409: The order cannot be cancelled in its current state

List a workspace's orders ​

GET/v1/workspaces/{wid}/ordersList a workspace's orders

Keyset-paginated orders placed in the given workspace, newest first. Requires workspace membership.

Path parameters

NameTypeRequiredDescription
widstringyesWorkspace id

Query parameters

NameTypeRequiredDescription
idstring[]noOrder ids to filter
account_idstring[]noAccount ids to filter
userstring[]noPanel user ids of the paying account to filter
workspace_idstring[]noWorkspace ids to filter
statusstring[]noStatuses to filter Values: DRAFT, AWAITING_APPROVAL, AWAITING_PAYMENT, GREEN, FULFILLED, FAILED, CANCELLED.
kindstring[]noKinds to filter Values: PURCHASE, UPGRADE, ADJUST.

Supports pagination.

Returns 200 OK with a paged envelope of OrderView objects.

Errors

  • 403: Not a member of the workspace

Place an order ​

POST/v1/workspaces/{wid}/ordersPlace an order

Prices one or more packages and places the order. For PREPAID fixed packages, the order raises one invoice for the first cycle and pays it from the wallet first. collection tells if a stored payment method is being charged or if a checkout is necessary for the remaining amount. Paying the invoice releases the order for provisioning. A POSTPAID or metered-only order collects nothing up front, releases immediately and bills in arrears. Servers count against the workspace quota. The order bills the workspace owner's account and requires the workspace admin role. When the workspace requires order approval, an order from a member other than the owner stays in AWAITING_APPROVAL and collects nothing until the owner approves it.

items must contain at least one item. Use PURCHASE for new resources and UPGRADE for an existing subject. ADJUST is also present in the schema enum. The current implementation routes non-UPGRADE requests through purchase handling.

Path parameters

NameTypeRequiredDescription
widstringyesWorkspace id the order is placed in

Request body

FieldTypeRequiredDescription
idempotency_keystring or nullnoOptional idempotency key. A replay returns the original order
itemsCreateOrderItemRequest[]yesThe packages being ordered, one subject each
kindstringyesPURCHASE provisions new subjects. UPGRADE changes an existing one Values: PURCHASE, UPGRADE, ADJUST.
payment_modestring or nullnoPayment mode for fixed packages in a purchase. PREPAID pays the first cycle now. POSTPAID bills each cycle on the monthly invoice and requires consolidated billing on the workspace. Default is PREPAID. Metered packages always bill for usage. Values: PREPAID, POSTPAID.
renewalstring or nullnoWhen prepaid fixed packages renew. TODAY: the first cycle starts now. MONTHLY_DATE: the first period is one full cycle plus the days until the account's monthly date, and the order charges for the extra days. If the account has no monthly date, MONTHLY_DATE is the same as TODAY. Default is TODAY. Values: TODAY, MONTHLY_DATE.
json
{
  "kind": "PURCHASE",
  "items": [
    {
      "package_code": "vps-small",
      "resource_name": "web-01",
      "properties": {
        "kind": "SERVER",
        "image": "1447636552321908736"
      }
    }
  ]
}

Returns 200 OK with CreateOrderResponse.

Errors

  • 402: Server quota exceeded, or the wallet balance is too low for a metered package
  • 403: Not an admin of the target workspace, or POSTPAID is not enabled for the owner
  • 404: Unknown workspace or package

Accounts and wallets ​

Get a user's billing account ​

GET/v1/users/{uid}/accountGet a user's billing account

Returns the user's billing account and its billing terms.

Path parameters

NameTypeRequiredDescription
uidstringyesUser id, or @me for the current user

Returns 200 OK with AccountView.

Errors

  • 404: No account for that user

Move the account's monthly date ​

POST/v1/users/{uid}/account/monthly-dateMove the account's monthly date

Sets the day of the month for the monthly invoice and for MONTHLY_DATE renewals. If the account has a monthly invoice, the usage and charges to date are invoiced now, and the next monthly invoice moves to the first date on the new day that is on or after its current date. Prepaid subjects keep their renewal days. move each subject to align it.

Path parameters

NameTypeRequiredDescription
uidstringyesUser id, or @me for the current user

Request body

FieldTypeRequiredDescription
dayinteger or nullyesNew day of the month. In shorter months the last day of the month applies. Minimum: 1. Maximum: 31.
json
{
  "day": 15
}

Returns 200 OK with AccountView.

Errors

  • 400: No day, or a day outside 1-31
  • 403: Not the account's user
  • 404: No account for that user

Get a user's wallet balance ​

GET/v1/users/{uid}/walletGet a user's wallet balance

Returns the wallet and its current balance for the given user.

Path parameters

NameTypeRequiredDescription
uidstringyesUser id, or @me for the current user

Returns 200 OK with WalletView.

Errors

  • 404: No wallet for that user

List a user's wallet movements ​

GET/v1/users/{uid}/wallet/movementsList a user's wallet movements

Keyset-paginated ledger movements for the user's wallet, newest first.

Path parameters

NameTypeRequiredDescription
uidstringyesUser id, or @me for the current user

Query parameters

NameTypeRequiredDescription
qstringnoQuick search by reference, group reference, or entry id
idstring[]noLedger entry ids to filter
typestring[]noMovement types to filter Values: TOPUP, USAGE_CHARGE, FIXED_CHARGE, INVOICE_SETTLEMENT, REFUND, ADJUSTMENT, COUPON, EXPIRY, CANCEL_REFUND, REPRICE_REFUND.
invoice_idstring[]noInvoice ids to filter
subject_idstring[]noSubject ids to filter
actorstring[]noActing user ids to filter
referencestringnoReference to match
group_refstringnoGroup reference to match
min_amountintegernoMinimum amount in micro-USD (inclusive, signed)
max_amountintegernoMaximum amount in micro-USD (inclusive, signed)
created_afterstringnoCreated at or after this instant (ISO-8601) ISO-8601 date-time.
created_beforestringnoCreated at or before this instant (ISO-8601) ISO-8601 date-time.

Supports pagination.

Returns 200 OK with a paged envelope of LedgerEntryView objects.

Errors

  • 404: No wallet for that user

Coupons ​

Redeem a coupon ​

POST/v1/users/{uid}/coupons/redeemRedeem a coupon

Mints the coupon's credit into the user's wallet. A coupon redeems once per user, and a coupon with no uses remaining is rejected.

Path parameters

NameTypeRequiredDescription
uidstringyesUser id, or @me for the current user

Request body

FieldTypeRequiredDescription
codestringyesCoupon code Minimum length: 1.
json
{
  "code": "WELCOME"
}

Returns 200 OK with RedeemCouponResponse.

Errors

  • 404: No such coupon code, or no account for that user
  • 409: Already redeemed by this user, or no uses remaining

List a user's coupon redemptions ​

GET/v1/users/{uid}/coupons/redemptionsList a user's coupon redemptions

Keyset-paginated coupons the user redeemed, newest first.

Path parameters

NameTypeRequiredDescription
uidstringyesUser id, or @me for the current user

Supports pagination.

Returns 200 OK with a paged envelope of CouponRedemptionView objects.

Errors

  • 404: No account for that user

Check whether a coupon can be redeemed ​

GET/v1/users/{uid}/coupons/validateCheck whether a coupon can be redeemed

Reports whether the user can redeem a code and what redeeming it would grant, without redeeming it. An unknown code is reported as invalid, not as an error.

Path parameters

NameTypeRequiredDescription
uidstringyesUser id, or @me for the current user

Query parameters

NameTypeRequiredDescription
codestringyesCoupon code

Returns 200 OK with CouponValidity.

Invoices ​

Get a rendered invoice ​

GET/v1/invoices/{invoice_id}Get a rendered invoice

Returns an invoice with its line items.

Path parameters

NameTypeRequiredDescription
invoice_idstringyesInvoice id

Returns 200 OK with InvoiceRenderResponse.

Errors

  • 404: No invoice with that id

List a user's invoices ​

GET/v1/users/{uid}/invoicesList a user's invoices

Keyset-paginated invoices for the given user, newest first.

Path parameters

NameTypeRequiredDescription
uidstringyesUser id, or @me for the current user

Query parameters

NameTypeRequiredDescription
qstringnoQuick search by user id or invoice number
idstring[]noInvoice ids to filter
account_idstring[]noAccount ids to filter
userstring[]noUser ids to filter
subject_idstring[]noSubject ids with a line on the invoice
statusstring[]noStatuses to filter Values: DRAFT, OPEN, PAID, VOID, UNCOLLECTIBLE.
kindstring[]noKinds to filter Values: CONSOLIDATED, TOPUP, ORDER.
numberstringnoInvoice number to match
currencystringnoCurrency code to filter, e.g. USD
min_totalintegernoMinimum invoice total in micro-USD (inclusive)
max_totalintegernoMaximum invoice total in micro-USD (inclusive)
outstandingbooleannoOnly open invoices with a positive amount due
created_afterstringnoCreated at or after this instant (ISO-8601) ISO-8601 date-time.
created_beforestringnoCreated at or before this instant (ISO-8601) ISO-8601 date-time.
issued_afterstringnoIssued at or after this instant (ISO-8601) ISO-8601 date-time.
issued_beforestringnoIssued at or before this instant (ISO-8601) ISO-8601 date-time.
due_afterstringnoDue at or after this instant (ISO-8601) ISO-8601 date-time.
due_beforestringnoDue at or before this instant (ISO-8601) ISO-8601 date-time.

Supports pagination.

Returns 200 OK with a paged envelope of InvoiceView objects.

Payments ​

Get the client payment configuration ​

GET/v1/payments/configGet the client payment configuration

Returns the browser configuration of each available gateway, keyed by gateway name, e.g. {"STRIPE": {"publishable_key": "pk_live_..."}}. An unavailable gateway is not in the object. An empty object means that no gateway accepts payments in the browser.

Returns 200 OK with object of GatewayClientConfig.

Get a payment ​

GET/v1/payments/{pid}Get a payment

Returns a payment by id.

Path parameters

NameTypeRequiredDescription
pidstringyesPayment id

Returns 200 OK with PaymentView.

Errors

  • 404: No payment with that id

List a user's payments ​

GET/v1/users/{uid}/paymentsList a user's payments

Keyset-paginated payments for the given user, newest first.

Path parameters

NameTypeRequiredDescription
uidstringyesUser id, or @me for the current user

Query parameters

NameTypeRequiredDescription
qstringnoQuick search by user id or gateway reference
idstring[]noPayment ids to filter
account_idstring[]noAccount ids to filter
userstring[]noUser ids to filter
invoice_idstring[]noInvoice ids to filter
payment_method_idstring[]noPayment method ids to filter
gatewaystring[]noGateways to filter Values: STRIPE, PAYPAL, MANUAL.
directionstring[]noDirections to filter Values: INBOUND, REFUND.
statusstring[]noStatuses to filter Values: PENDING, SUCCEEDED, FAILED, REFUNDED.
gateway_refstringnoGateway reference to match
currencystringnoCurrency code to filter, e.g. USD
min_amountintegernoMinimum amount in micro-USD (inclusive)
max_amountintegernoMaximum amount in micro-USD (inclusive)
created_afterstringnoCreated at or after this instant (ISO-8601) ISO-8601 date-time.
created_beforestringnoCreated at or before this instant (ISO-8601) ISO-8601 date-time.
captured_afterstringnoCaptured at or after this instant (ISO-8601) ISO-8601 date-time.
captured_beforestringnoCaptured at or before this instant (ISO-8601) ISO-8601 date-time.

Supports pagination.

Returns 200 OK with a paged envelope of PaymentView objects.

Open a checkout ​

POST/v1/users/{uid}/payments/checkoutOpen a checkout

Opens a checkout session for the customer to pay an invoice, or to fund the wallet when no invoice is given. Returns a client secret to mount in the browser. The payment stays pending until the gateway confirms settlement, which is immediate for a card but can take days for a bank transfer or direct debit. whatever the customer pays with is stored for future charges when it can be. Resumes the session already collecting an invoice rather than opening a second.

Path parameters

NameTypeRequiredDescription
uidstringyesUser id, or @me for the current user

Request body

FieldTypeRequiredDescription
amountinteger or nullnoAmount to fund the wallet by, micro-USD, between $20 and $500. Required when no invoice is supplied, and ignored when one is, since the invoice sets the amount Minimum: 20000000. Maximum: 500000000.
gatewaystringyesGateway hosting the checkout Values: STRIPE, PAYPAL, MANUAL.
invoice_idstring or nullnoInvoice to collect. Null funds the wallet by the amount below
json
{
  "gateway": "STRIPE",
  "amount": 25000000
}

Returns 200 OK with CheckoutResponse.

Errors

  • 400: A wallet funding amount outside $20 to $500
  • 404: No account or wallet for that user, or no such invoice
  • 409: The invoice is not open, already paid, or has another payment in flight

Top up a wallet from the default payment method ​

POST/v1/users/{uid}/payments/topupTop up a wallet from the default payment method

Records a pending charge against the stored method the account pays with and settles it asynchronously. on success it funds the wallet with a TOPUP lot, settling a tied invoice or issuing a TOPUP receipt. Requires a stored method: to pay with a new one, open a checkout instead. Idempotent on the supplied key. Returns the pending payment.

Path parameters

NameTypeRequiredDescription
uidstringyesUser id, or @me for the current user

Request body

FieldTypeRequiredDescription
amountintegeryesAmount to charge, micro-USD, between $20 and $500 Minimum: 20000000. Maximum: 500000000.
idempotency_keystring or nullnoKey that makes a replay return the existing payment rather than charging again
invoice_idstring or nullnoInvoice this top-up settles, if any. Null issues a TOPUP receipt instead
json
{
  "amount": 25000000,
  "idempotency_key": "topup-1042-a1"
}

Returns 200 OK with PaymentView.

Errors

  • 400: The amount is outside $20 to $500
  • 404: No account or wallet for that user, or no such invoice
  • 409: No stored default payment method, or the invoice is not collectible

Payment methods ​

Get a payment method ​

GET/v1/payment-methods/{pmid}Get a payment method

Returns a stored payment method by id.

Path parameters

NameTypeRequiredDescription
pmidstringyesPayment method id

Returns 200 OK with PaymentMethodView.

Errors

  • 404: No payment method with that id

Delete a payment method ​

DELETE/v1/payment-methods/{pmid}Delete a payment method

Removes a stored payment method and releases it at its gateway. Deleting the default promotes the newest remaining method in its place, so an account with any method left always has one to charge.

Path parameters

NameTypeRequiredDescription
pmidstringyesPayment method id

Returns 200 OK with an empty body.

Errors

  • 404: No payment method with that id

Set a method as default ​

POST/v1/payment-methods/{pmid}/defaultSet a method as default

Makes this method the account's default, unsetting any prior default in the same transaction. A no-op if it is already the default.

Path parameters

NameTypeRequiredDescription
pmidstringyesPayment method id

Returns 200 OK with PaymentMethodView.

Errors

  • 404: No payment method with that id

List a user's payment methods ​

GET/v1/users/{uid}/payment-methodsList a user's payment methods

Keyset-paginated stored payment methods for the given user, newest first. Exactly one carries is_default, the method charged when no one is present.

Path parameters

NameTypeRequiredDescription
uidstringyesUser id, or @me for the current user

Query parameters

NameTypeRequiredDescription
qstringnoQuick search by user id, card brand, or last four
idstring[]noPayment method ids to filter
account_idstring[]noAccount ids to filter
userstring[]noUser ids to filter
gatewaystring[]noGateways to filter Values: STRIPE, PAYPAL, MANUAL.
brandstringnoCard brand to match, e.g. visa
last4stringnoCard last four to match
is_defaultbooleannoOnly the account's default method
created_afterstringnoCreated at or after this instant (ISO-8601) ISO-8601 date-time.
created_beforestringnoCreated at or before this instant (ISO-8601) ISO-8601 date-time.

Supports pagination.

Returns 200 OK with a paged envelope of PaymentMethodView objects.

Confirm a stored method ​

POST/v1/users/{uid}/payment-methods/confirmConfirm a stored method

Saves the method a completed checkout stored, so it is available immediately rather than once the gateway notifies us. Repeating it returns the same method. Responds with no content when the checkout stored nothing, which is the case for methods that cannot be charged later.

Path parameters

NameTypeRequiredDescription
uidstringyesUser id, or @me for the current user

Request body

FieldTypeRequiredDescription
gatewaystringyesGateway that hosted the checkout Values: STRIPE, PAYPAL, MANUAL.
session_refstringyesSession reference returned when the checkout was opened Minimum length: 1.
json
{
  "gateway": "STRIPE",
  "session_ref": "cs_test_a1B2c3D4e5"
}

Returns 200 OK with PaymentMethodView.

The response body is empty when the checkout stored no reusable method.

Errors

  • 404: No account for that user, or the checkout belongs to another

Open a checkout to store a method ​

POST/v1/users/{uid}/payment-methods/setupOpen a checkout to store a method

Opens a checkout that stores a payment method without collecting money. Returns a client secret to mount in the browser. only methods that can be charged later are offered.

Path parameters

NameTypeRequiredDescription
uidstringyesUser id, or @me for the current user

Request body

FieldTypeRequiredDescription
gatewaystringyesGateway that will hold the method Values: STRIPE, PAYPAL, MANUAL.
json
{
  "gateway": "STRIPE"
}

Returns 200 OK with CheckoutResponse.

Errors

  • 404: No account for that user
  • 409: A concurrent request is already setting up this gateway

Billing subjects and usage ​

Get a subject ​

GET/v1/subjects/{sid}Get a subject

Returns a subject with its full spec and the priced fields behind its price.

Path parameters

NameTypeRequiredDescription
sidstringyesSubject id

Returns 200 OK with SubjectDetailResponse.

Errors

  • 403: Not a member of the subject's workspace
  • 404: No subject with that id

Cancel a purchase ​

POST/v1/subjects/{sid}/cancelCancel a purchase

Terminates a delivered subject, stopping its billing. A fixed-prepaid subject refunds the unused part of the cycle to the wallet when the account is set up for it. A cycle paid before it starts is refunded in full, and an unpaid renewal is removed from its invoice. A fixed-postpaid one posts its final partial cycle on the next bill, and a metered one charges accrued usage up to now. A purchase that has not been delivered yet is cancelled on its order instead. Cancelling an already cancelled purchase is a no-op.

Path parameters

NameTypeRequiredDescription
sidstringyesSubject id

Returns 200 OK with SubjectView.

Errors

  • 404: No subject with that id, or no account or wallet behind it

Quote cancelling a subject ​

GET/v1/subjects/{sid}/cancel-quoteQuote cancelling a subject

Returns the wallet refund that a cancel of the subject gives at this time, and the reason. The refund is prorated by the hour, so a cancel in the same hour gives the same amount.

Path parameters

NameTypeRequiredDescription
sidstringyesSubject id

Returns 200 OK with CancelQuoteResponse.

Errors

  • 403: Not a member of the subject's workspace
  • 404: No subject with that id
  • 409: The subject is already terminated

Move a subject's renewal day ​

POST/v1/subjects/{sid}/renewal-dayMove a subject's renewal day

Moves the renewal of a paid-up prepaid subject forward to a day of the month. The default is the account's monthly date. The renewal only moves later, and the added days are charged at the subject's price. If the wallet cannot pay, an invoice is created and the renewal moves when it is paid.

Path parameters

NameTypeRequiredDescription
sidstringyesSubject id

Request body

FieldTypeRequiredDescription
dayinteger or nullnoDay of the month to renew on. In shorter months the last day of the month applies. Defaults to the account's monthly date. Minimum: 1. Maximum: 31.
json
{
  "day": 15
}

Returns 200 OK with RenewalDayResponse.

Errors

  • 400: Not a prepaid subject, a day outside 1-31, or no day while the account has no monthly date
  • 403: Not the subject's owner
  • 404: No subject with that id
  • 409: The subject is not active, not paid up, has a renewal on an unpaid invoice, or already has a move awaiting payment

Quote moving a subject's renewal day ​

GET/v1/subjects/{sid}/renewal-day-quoteQuote moving a subject's renewal day

Returns the renewal of a prepaid subject after a move forward to a day of the month, and the current charge for the added days.

Path parameters

NameTypeRequiredDescription
sidstringyesSubject id

Query parameters

NameTypeRequiredDescription
dayintegernoDay of the month to renew on. Defaults to the account's monthly date

Returns 200 OK with RenewalDayQuoteResponse.

Errors

  • 400: Not a prepaid subject, a day outside 1-31, or no day while the account has no monthly date
  • 403: Not a member of the subject's workspace
  • 404: No subject with that id
  • 409: The subject is not active, not paid up, or has a renewal on an unpaid invoice

List a subject's moves ​

GET/v1/subjects/{sid}/transitionsList a subject's moves

Keyset-paginated listing of the upgrades and downgrades that the subject's current package offers. Each move keeps the subject's current values in the target's open fields and shows the price and prorated amount that an upgrade order bills. A move that the subject cannot make has eligible false and the reason that the order returns. A change to the open fields of the current package is not listed. use an upgrade order to the same package.

Path parameters

NameTypeRequiredDescription
sidstringyesSubject id

Query parameters

NameTypeRequiredDescription
directionstring[]noDirections to filter Values: UPGRADE, DOWNGRADE.

Supports pagination.

Returns 200 OK with a paged envelope of SubjectTransitionResponse objects.

Errors

  • 403: Not a member of the subject's workspace
  • 404: No subject with that id

List a subject's usage ​

GET/v1/subjects/{sid}/usageList a subject's usage

Keyset-paginated hourly metered usage for a subject, newest first. Empty for a subject billed a fixed price per cycle.

Path parameters

NameTypeRequiredDescription
sidstringyesSubject id

Supports pagination.

Returns 200 OK with a paged envelope of UsageRecordView objects.

Errors

  • 403: Not a member of the subject's workspace
  • 404: No subject with that id

List a workspace's subjects ​

GET/v1/workspaces/{wid}/subjectsList a workspace's subjects

Keyset-paginated services bought in the workspace, newest first, with their price, cycle, next renewal and state.

Path parameters

NameTypeRequiredDescription
widstringyesWorkspace id

Query parameters

NameTypeRequiredDescription
qstringnoQuick search by resource name, or an exact subject id
idstring[]noSubject ids to filter
statestring[]noStates to filter Values: ACTIVE, SUSPENDED, TERMINATED.
resource_kindstring[]noKinds to filter Values: SERVER, IP_ADDRESS.
package_codestring[]noPackage SKUs to filter
charge_basisstring[]noCharge bases to filter Values: FIXED, METERED.

Supports pagination.

Returns 200 OK with a paged envelope of SubjectView objects.

Errors

  • 403: Not a member of the workspace

List a workspace's metered usage ​

GET/v1/workspaces/{wid}/usageList a workspace's metered usage

Keyset-paginated metered subjects of the workspace, each with the minutes and charge it accrued between from (inclusive) and to (exclusive). The window defaults to the current calendar month in UTC, up to now.

Path parameters

NameTypeRequiredDescription
widstringyesWorkspace id

Query parameters

NameTypeRequiredDescription
fromstringnoStart of the window, inclusive. Defaults to the start of the current UTC month ISO-8601 date-time.
tostringnoEnd of the window, exclusive. Defaults to now ISO-8601 date-time.
qstringnoQuick search by resource name, or an exact subject id
idstring[]noSubject ids to filter
statestring[]noStates to filter Values: ACTIVE, SUSPENDED, TERMINATED.
resource_kindstring[]noKinds to filter Values: SERVER, IP_ADDRESS.
package_codestring[]noPackage SKUs to filter
charge_basisstring[]noCharge bases to filter Values: FIXED, METERED.

Supports pagination.

Returns 200 OK with a paged envelope of SubjectUsageResponse objects.

Errors

  • 400: The window ends before it starts
  • 403: Not a member of the workspace

Gateway webhooks ​

Ingest a gateway webhook ​

POST/v1/webhooks/{gateway}Ingest a gateway webhook

We accept raw payment gateway events without bearer authentication. Gateway-specific verification uses the original payload and headers. This endpoint is for gateway delivery, not for confirming a payment from a customer script. Preserve the signed bytes and provider headers.

Path parameters

NameTypeRequiredDescription
gatewaystringyesSTRIPE, PAYPAL, or MANUAL

Request body

The body is required. The specification represents it as a string with format: byte under application/json. The controller consumes raw bytes. Send the original gateway payload without wrapping or re-encoding it.

We record a first delivery and apply it asynchronously to the payment. Duplicate event references are ignored and move no money.

Returns 200 OK with WebhookResponse:

FieldTypeRequiredDescription
event_idstringyesRecorded event id
event_refstringyesGateway event reference
gatewaystringyesOriginating gateway Values: STRIPE, PAYPAL, MANUAL.
payment_idstring or nullnoPayment this event reconciled, if any
statusstringyesRECEIVED when the event is accepted for processing, IGNORED when it repeats one already accepted or carries nothing to act on Values: RECEIVED, PROCESSED, IGNORED, FAILED.
typestringyesNormalized event type

The initial outcome is RECEIVED or IGNORED. The response schema also permits PROCESSED and FAILED. Concurrent ingestion of the same event returns 409 Conflict. Retry that delivery.

Data objects ​

AccountView ​

A billing account, one per user, owning the wallet its subjects bill against.

FieldTypeRequiredDescription
consolidated_billingbooleanyesWhether the account may buy fixed packages as POSTPAID, billed on the monthly invoice
created_atstringyesCreation timestamp of the account ISO-8601 date-time.
credit_limitintegeryesHow far the wallet may go negative before new authorizations stop, in micro-USD (1 USD = 1,000,000). Defaults to 0
grace_period_secondsintegeryesHow long past an invoice due date the subjects stay up before suspension, in seconds. Defaults to 0
idstringyesAccount id
namestringyesAccount display name
next_payment_atstring or nullnoWhen the payment run next falls due. Null while none is scheduled ISO-8601 date-time.
payment_dayinteger or nullnoThe account's monthly date: the day of the monthly invoice and of MONTHLY_DATE renewals. In shorter months, the last day of the month applies. Null until the first purchase
postpaid_partialbooleanyesWhether a postpaid subject bills only the consumed part of its final cycle
prepaid_creditbooleanyesWhether cancelling a prepaid subject early refunds its unused portion as wallet credit
statestringyesLifecycle state of the account Values: ACTIVE, CLOSED.
userUserSimpleyesUser the account bills for

CancelQuoteResponse ​

The refund that a cancel of the subject gives at this time.

FieldTypeRequiredDescription
period_endstring or nullnoEnd of the subject's current cycle. Null for a subject billed without cycles ISO-8601 date-time.
reasonstringyesThe reason for the refund amount Values: REFUNDED, FORFEIT, NOTHING_UNUSED, UNPAID, METERED, POSTPAID.
refundintegeryesWallet credit the cancel refunds, micro-USD. 0 unless reason is REFUNDED

CheckoutResponse ​

A checkout session to mount in the browser. The payment is pending until the customer completes it and the gateway confirms settlement, which for a bank transfer or direct debit can take days.

FieldTypeRequiredDescription
client_secretstringyesClient secret Stripe.js initializes the checkout with
payment_idstring or nullnoPending payment this checkout collects. Null when the checkout only stores a method
session_refstringyesGateway session reference

CouponRedemptionView ​

One coupon a user redeemed and the credit it granted.

FieldTypeRequiredDescription
amountintegeryesCredit the coupon grants, micro-USD
codestringyesCode of the coupon redeemed
coupon_idstringyesCoupon redeemed
credit_lot_idstringyesCredit lot the redemption minted in the wallet
idstringyesRedemption id
redeemed_atstringyesWhen the coupon was redeemed ISO-8601 date-time.

CouponValidity ​

Whether a coupon code can be redeemed, and what redeeming it would grant.

FieldTypeRequiredDescription
amountinteger or nullnoCredit redeeming it grants, micro-USD. Null when no coupon carries that code
expiry_daysinteger or nullnoDays after redemption the granted credit expires. Null when the credit never expires or when no coupon carries that code
reasonstring or nullnoWhy it cannot be redeemed. Null when it can Values: NOT_FOUND, EXHAUSTED, ALREADY_REDEEMED.
validbooleanyesWhether the coupon can be redeemed

CreateOrderItemRequest ​

One line on an order: a package to purchase, or a change to an existing subject on an upgrade.

FieldTypeRequiredDescription
package_codestringyesPackage SKU code: the package to buy, or on an upgrade the package the subject moves to, which may be its current one to choose new values for its open fields.
propertiesKindProperties or nullnoPurchase only: provisioning inputs for the new resource. A SERVER purchase must name the template or backup to install. The kind must match the package's kind. These values do not change the price and are never returned. An upgrade rejects this field.
prorateboolean or nullnoUpgrade only: split the in-progress cycle at now and prorate the change. Defaults to true. Ignored on a purchase.
resource_namestring or nullnoDisplay name for the resource. Defaults to the package name. A server's name is also its hostname: letters, digits and hyphens in dot-separated labels, at most 63 characters.
specKindSpec or nullnoValues for the fields the package leaves open, typed by the package's kind. On an upgrade, an open field left out keeps the subject's current value.
target_subject_idstring or nullnoOn an upgrade, the id of the subject to change. Required for an upgrade item, and the subject must belong to the order's workspace.

CreateOrderResponse ​

The result of placing an order.

FieldTypeRequiredDescription
authorizedbooleanyesWhether the order is currently GREEN. This does not confirm that provisioning has finished.
collectionstringyesUse NONE when nothing is owed, wait for settlement with IN_FLIGHT, open a checkout with REQUIRED, ask the workspace owner to approve with APPROVAL_REQUIRED, or have the owner pay with OWNER_REQUIRED. Values: NONE, IN_FLIGHT, REQUIRED, APPROVAL_REQUIRED, OWNER_REQUIRED.
invoice_idstring or nullnoInvoice raised to collect the order, if any
orderOrderViewyesThe order as it stands after placement

GatewayClientConfig ​

Configuration to initialise the client library of one gateway

One of StripeClientConfig.

InvoiceRenderResponse ​

A rendered invoice: its own fields flattened inline, plus the line items composing it.

FieldTypeRequiredDescription
account_idstringyesAccount the invoice is billed to
amount_dueintegeryesAmount still payable on this invoice, micro-USD
amount_paidintegeryesAmount already applied to this invoice, micro-USD
created_atstringyesCreation time of the invoice ISO-8601 date-time.
currencystringyesISO 4217 currency code of the invoice
due_atstring or nullnoPayment due date, stamped when the invoice is issued ISO-8601 date-time.
idstringyesInvoice id
issued_atstring or nullnoIssue time, null while the invoice is DRAFT ISO-8601 date-time.
kindstringyesCONSOLIDATED, TOPUP or ORDER Values: CONSOLIDATED, TOPUP, ORDER.
line_itemsInvoiceLineItemView[]yesLine items composing the invoice subtotal
numberstring or nullnoHuman-readable invoice number, allocated when the invoice is issued and null while DRAFT
paid_atstring or nullnoSettlement time, null until the invoice is fully paid ISO-8601 date-time.
pending_payment_countintegeryesHow many payments against this invoice are still awaiting confirmation
period_endstring or nullnoEnd of the billed period, if the invoice covers one ISO-8601 date-time.
period_startstring or nullnoStart of the billed period, if the invoice covers one ISO-8601 date-time.
statusstringyesDRAFT, OPEN, PAID, VOID or UNCOLLECTIBLE Values: DRAFT, OPEN, PAID, VOID, UNCOLLECTIBLE.
subject_idstring or nullnoBilling subject this invoice covers, null for consolidated and top-up invoices
subtotalintegeryesSum of the line items before tax, micro-USD
tax_totalintegeryesTax charged on top of the subtotal, micro-USD
totalintegeryesTotal invoiced, subtotal plus tax, micro-USD
userUserSimpleyesUser the account bills for

InvoiceLineItemView ​

One priced line composing an invoice's subtotal.

FieldTypeRequiredDescription
amountintegeryesTotal charged on this line, micro-USD
created_atstringyesCreation time of the line item ISO-8601 date-time.
descriptionstringyesHuman-readable description of the charge
idstringyesLine item id
invoice_idstringyesInvoice this line belongs to
kindstringyesFIXED_CYCLE, RENEWAL, METERED_USAGE, TOPUP, PRORATION_REFUND, CREDIT, ADJUSTMENT or TAX Values: FIXED_CYCLE, RENEWAL, METERED_USAGE, TOPUP, PRORATION_REFUND, CREDIT, ADJUSTMENT, TAX.
metadataobject or nullnoFree-form details attached to the line
period_endstring or nullnoEnd of the period this line covers, if any ISO-8601 date-time.
period_startstring or nullnoStart of the period this line covers, if any ISO-8601 date-time.
quantityintegeryesNumber of units billed on this line
subject_idstring or nullnoBilling subject this line is charged for, if any
unit_amountintegeryesPrice of a single unit, micro-USD

InvoiceView ​

A collection request against an account, with its totals, status and lifecycle timestamps.

FieldTypeRequiredDescription
account_idstringyesAccount the invoice is billed to
amount_dueintegeryesAmount still payable on this invoice, micro-USD
amount_paidintegeryesAmount already applied to this invoice, micro-USD
created_atstringyesCreation time of the invoice ISO-8601 date-time.
currencystringyesISO 4217 currency code of the invoice
due_atstring or nullnoPayment due date, stamped when the invoice is issued ISO-8601 date-time.
idstringyesInvoice id
issued_atstring or nullnoIssue time, null while the invoice is DRAFT ISO-8601 date-time.
kindstringyesCONSOLIDATED, TOPUP or ORDER Values: CONSOLIDATED, TOPUP, ORDER.
numberstring or nullnoHuman-readable invoice number, allocated when the invoice is issued and null while DRAFT
paid_atstring or nullnoSettlement time, null until the invoice is fully paid ISO-8601 date-time.
pending_payment_countintegeryesHow many payments against this invoice are still awaiting confirmation
period_endstring or nullnoEnd of the billed period, if the invoice covers one ISO-8601 date-time.
period_startstring or nullnoStart of the billed period, if the invoice covers one ISO-8601 date-time.
statusstringyesDRAFT, OPEN, PAID, VOID or UNCOLLECTIBLE Values: DRAFT, OPEN, PAID, VOID, UNCOLLECTIBLE.
subject_idstring or nullnoBilling subject this invoice covers, null for consolidated and top-up invoices
subtotalintegeryesSum of the line items before tax, micro-USD
tax_totalintegeryesTax charged on top of the subtotal, micro-USD
totalintegeryesTotal invoiced, subtotal plus tax, micro-USD
userUserSimpleyesUser the account bills for

KindProperties ​

Provisioning inputs for a purchase, typed by kind

One of ServerProperties or IpAddressProperties.

Choose the object using its kind field.

IpAddressProperties ​

Provisioning inputs for an IP_ADDRESS. it takes none.

FieldTypeRequiredDescription
kindstringyesThe kind these properties are for Values: IP_ADDRESS.

KindSpec ​

Values for the fields a package leaves open, typed by kind

One of ServerSpec or IpAddressSpec.

Choose the object using its kind field.

IpAddressSpec ​

Values for an IP_ADDRESS package's open fields.

FieldTypeRequiredDescription
ddosboolean or nullnoWhether the address is DDoS protected
familystring or nullnoAddress family Values: IPv4, IPv6.
kindstringyesThe kind this spec is for Values: IP_ADDRESS.
regionstring or nullnoWhere the address is routed Values: NA_01.

LedgerEntryView ​

One line of a wallet's append-only journal, recording a single movement of credit.

FieldTypeRequiredDescription
actorUserSimple or nullnoUser who initiated the movement, if any
amountintegeryesSigned movement amount, micro-USD. positive credits, negative draws
balance_afterintegeryesWallet balance after this entry, micro-USD
created_atstringyesWhen the entry was written ISO-8601 date-time.
group_refstring or nullnoTies together the entries a single draw produces across credit lots
idstringyesLedger entry id
invoice_idstring or nullnoInvoice this entry relates to, if any
lot_idstring or nullnoCredit lot this entry credits or draws. Null on an overdraft entry
referencestring or nullnoFree-form reference describing the movement
subject_idstring or nullnoBilling subject this entry is attributed to, if any
typestringyesKind of movement this entry records Values: TOPUP, USAGE_CHARGE, FIXED_CHARGE, INVOICE_SETTLEMENT, REFUND, ADJUSTMENT, COUPON, EXPIRY, CANCEL_REFUND, REPRICE_REFUND.
wallet_idstringyesWallet this entry belongs to

OrderDetailResponse ​

An order with its items and their part lines.

FieldTypeRequiredDescription
itemsItem[]yesThe order's items, each with its part lines
orderOrderViewyesThe order

Item ​

An order item with its part lines.

FieldTypeRequiredDescription
itemOrderItemViewyesThe item
partsOrderItemPartView[]yesThe item's part lines

OrderItemPartView ​

One field of an order item, with its priced contribution.

FieldTypeRequiredDescription
amountintegeryesThis part's contribution to the item charge, micro-USD
idstringyesOrder item part id
order_item_idstringyesOrder item this part belongs to
part_codestringyesField code
quantityinteger or nullnoValue of a numeric field
rate_card_idstring or nullnoRate card that priced this part, if any
unit_priceintegeryesMonthly rate snapshot, micro-USD
valuestring or nullnoValue of an enum or boolean field

OrderItemView ​

One package on an order, with its snapshotted price and charge terms.

FieldTypeRequiredDescription
amountintegeryesThis item's contribution to the order total, micro-USD
base_priceintegeryesFlat base price snapshot, micro-USD
charge_basisstringyesFIXED or METERED Values: FIXED, METERED.
cycle_countinteger or nullnoCycle length in units
cycle_unitstring or nullnoCycle unit, e.g. MONTH
idstringyesOrder item id
kindstringyesPURCHASE or UPGRADE Values: PURCHASE, UPGRADE, ADJUST.
order_idstringyesOrder this item belongs to
package_codestringyesPackage SKU code purchased
payment_modestringyesPREPAID or POSTPAID Values: PREPAID, POSTPAID.
resource_kindstringyesKind of resource this item bills for Values: SERVER, IP_ADDRESS.
resource_namestringyesDisplay name for the resource
subject_idstring or nullnoSubject created for this item on green, null until then
target_subject_idstring or nullnoSubject an upgrade targets, null for a purchase

OrderView ​

A purchase or upgrade transaction, with its totals, status and the invoice it collects on.

FieldTypeRequiredDescription
account_idstringyesAccount the order is billed to
actorUserSimpleyesUser who placed the order
created_atstringyesCreation time of the order ISO-8601 date-time.
greened_atstring or nullnoTime the order greened into subjects, null until then ISO-8601 date-time.
idstringyesOrder id
invoice_idstring or nullnoInvoice raised to collect the order, null until one is raised
kindstringyesPURCHASE or UPGRADE Values: PURCHASE, UPGRADE, ADJUST.
statusstringyesDRAFT, AWAITING_APPROVAL, AWAITING_PAYMENT, GREEN, FULFILLED, FAILED or CANCELLED. FAILED means the invoice was not paid, or the subject changed before a paid plan change applied and the payment was returned as account credit. Values: DRAFT, AWAITING_APPROVAL, AWAITING_PAYMENT, GREEN, FULFILLED, FAILED, CANCELLED.
subtotalintegeryesSum of the item amounts before tax, micro-USD
totalintegeryesTotal to collect for the order, micro-USD
userUserSimpleyesWorkspace owner the order bills
workspaceWorkspaceSimple or nullnoWorkspace the order was placed in

PackageDetailResponse ​

A package with its offers, its rate card and its cheapest price.

FieldTypeRequiredDescription
base_priceintegeryesPrice per cycle covering every pinned field, micro-USD
charge_basisstringyesFIXED or METERED Values: FIXED, METERED.
codestringyesUnique package code
created_atstringyesCreation time ISO-8601 date-time.
cycle_countinteger or nullnoCycle length in units
cycle_unitstring or nullnoCalendar cycle unit
from_priceinteger or nullnoCheapest price the package sells at, micro-USD: the base price plus every field the buyer chooses at its cheapest value. Per cycle for FIXED charge, per active hour for METERED. Equal to base_price when the buyer chooses nothing priced. Null when the package cannot be priced
idstringyesPackage id
namestringyesDisplay name
rate_cardRateCardDetailResponse or nullnoRate card for the fields the buyer selects. Null when the base price is the full price
rate_card_idstring or nullnoRate card pricing the fields the buyer chooses
resource_kindstringyesKind sold, which fixes the shape of the spec Values: SERVER, IP_ADDRESS.
specPackageSpecPartView[]yesOne offer per field
statestringyesACTIVE (sold) or RETIRED (not sold). A retired package stays readable by code Values: ACTIVE, RETIRED.

PackageSpecPartView ​

A package's offer for one field: a pinned value, or a choice left to the buyer.

FieldTypeRequiredDescription
idstringyesSpec part id
max_qtyinteger or nullnoLargest value the buyer may choose for an open numeric field
min_qtyinteger or nullnoSmallest value the buyer may choose for an open numeric field
modestringyesPINNED (the package sets the value) or OPEN (the buyer chooses it) Values: PINNED, OPEN.
package_idstringyesPackage this spec line belongs to
part_codestringyesField code
quantityinteger or nullnoPinned value of a numeric field
valuestring or nullnoPinned value of an enum or boolean field

PackageTransitionResponse ​

A move a subject on the source package may make, with the package it goes to.

FieldTypeRequiredDescription
created_atstringyesCreation time ISO-8601 date-time.
directionstringyesUPGRADE or DOWNGRADE Values: UPGRADE, DOWNGRADE.
idstringyesTransition id
targetPackageDetailResponseyesThe package the move goes to, in the same shape as a package list item

PaymentMethodView ​

A payment method stored at a gateway so an account can be charged without the customer present.

FieldTypeRequiredDescription
account_idstringyesAccount this method belongs to
brandstring or nullnoCard brand
created_atstringyesWhen the method was stored ISO-8601 date-time.
exp_monthinteger or nullnoCard expiry month
exp_yearinteger or nullnoCard expiry year
gatewaystringyesGateway holding this method Values: STRIPE, PAYPAL, MANUAL.
gateway_customer_refstringyesGateway's own reference for the customer holding this method
gateway_method_refstringyesGateway's own reference for the stored method
idstringyesPayment method id
is_defaultbooleanyesWhether this is the account's default method for automatic charges
last4string or nullnoLast four digits of the card
userUserSimpleyesUser the account bills for

PaymentView ​

A real-money movement collected from or returned to an account through a payment gateway.

FieldTypeRequiredDescription
account_idstringyesAccount this payment belongs to
amountintegeryesPayment amount, micro-USD
captured_atstring or nullnoWhen the gateway settled the payment. Null while it is pending ISO-8601 date-time.
created_atstringyesWhen the payment was created ISO-8601 date-time.
credit_lot_idstring or nullnoWallet credit lot a succeeded inbound payment mints. Null otherwise
currencystringyesISO currency code of the amount
directionstringyesINBOUND for money collected, REFUND for money returned Values: INBOUND, REFUND.
failure_reasonstring or nullnoWhy the gateway declined a failed payment. Null otherwise
gatewaystringyesGateway processing this payment Values: STRIPE, PAYPAL, MANUAL.
gateway_refstring or nullnoGateway's own reference for this payment
idstringyesPayment id
invoice_idstring or nullnoInvoice this payment applies to, if any
payment_method_idstring or nullnoStored payment method charged for this payment, if any
refund_ofstring or nullnoFor a refund, ID of the original payment. Null otherwise
refunded_amountintegeryesAmount refunded from this payment, micro-USD. 0 if not refunded or if this payment is a refund
statusstringyesPENDING until the gateway settles the payment, then SUCCEEDED, FAILED, or REFUNDED Values: PENDING, SUCCEEDED, FAILED, REFUNDED.
userUserSimpleyesUser the account bills for

RateCardDetailResponse ​

A rate card with its prices.

FieldTypeRequiredDescription
codestringyesUnique rate card code
created_atstringyesCreation time ISO-8601 date-time.
idstringyesRate card id
namestringyesDisplay name
partsRateCardPartView[]yesPrices
statestringyesACTIVE or RETIRED Values: ACTIVE, RETIRED.

RateCardPartView ​

One price on a rate card, micro-USD per month.

FieldTypeRequiredDescription
idstringyesRate card part id
part_codestringyesField code
per_unitsintegeryesHow many units of a numeric field unit_price covers
rate_card_idstringyesRate card this price belongs to
unit_priceintegeryesPrice per month, micro-USD: per per_units units, or flat for a value
valuestring or nullnoThe enum or boolean value this flat price is for. Null when the line prices a numeric field

RedeemCouponResponse ​

The result of a coupon redemption: the wallet after the grant and the COUPON ledger entry it wrote.

FieldTypeRequiredDescription
entryLedgerEntryViewyesThe COUPON ledger entry recording the granted credit
walletWalletViewyesThe wallet as it stands after the credit lands

RenewalDayQuoteResponse ​

What moving a subject's renewal day costs at this time.

FieldTypeRequiredDescription
anchor_dayintegeryesThe day of the month the subject renews on after the move
chargeintegeryesThe charge for the added days, micro-USD
new_period_endstringyesWhen the subject renews after the move ISO-8601 date-time.
period_endstringyesWhen the subject renews before the move ISO-8601 date-time.

RenewalDayResponse ​

The result of moving a subject's renewal day.

FieldTypeRequiredDescription
appliedbooleanyesWhether the renewal moved. False while the invoice for the added days is unpaid.
collectionstringyesNONE if nothing is owed, IN_FLIGHT while a stored method is charging, REQUIRED to go to a checkout Values: NONE, IN_FLIGHT, REQUIRED, APPROVAL_REQUIRED, OWNER_REQUIRED.
invoice_idstring or nullnoThe invoice for the added days, when they could not be paid from the wallet
subjectSubjectViewyesThe subject after the move

ServerProperties ​

Provisioning inputs for a SERVER.

FieldTypeRequiredDescription
imagestringyesTemplate or backup installed on the disk
kindstringyesThe kind these properties are for Values: SERVER.

ServerSpec ​

Values for a SERVER package's open fields.

FieldTypeRequiredDescription
backupstring or nullnoBackup schedule Values: WEEKLY, DAILY.
cpuinteger or nullnoVirtual CPU cores Minimum: 1. Maximum: 128.
diskinteger or nullnoDisk size in GiB Minimum: 10. Maximum: 4000. Multiple of: 10.
downloadinteger or nullnoDownload bandwidth in Mbps Minimum: 100. Maximum: 10000. Multiple of: 100.
io_readinteger or nullnoDisk read limit in MiB/s Minimum: 1. Maximum: 95000.
io_read_iopsinteger or nullnoDisk read limit in IOPS Minimum: 1. Maximum: 10000000.
io_writeinteger or nullnoDisk write limit in MiB/s Minimum: 1. Maximum: 95000.
io_write_iopsinteger or nullnoDisk write limit in IOPS Minimum: 1. Maximum: 10000000.
ipv4integer or nullnoIPv4 addresses included Minimum: 0. Maximum: 16.
ipv6integer or nullnoIPv6 addresses included Minimum: 0. Maximum: 16.
kindstringyesThe kind this spec is for Values: SERVER.
raminteger or nullnoMemory in MiB Minimum: 512. Maximum: 524288. Multiple of: 512.
regionstring or nullnoWhere the server runs Values: NA_01.
service_groupstring or nullnoHardware line the server runs on Values: LIGHTNING, RYZEN, DEDICATED.
storage_backendstring or nullnoStorage the disk lives on Values: LOCAL, CEPH.
uploadinteger or nullnoUpload bandwidth in Mbps Minimum: 100. Maximum: 10000. Multiple of: 100.

StripeClientConfig ​

Configuration for Stripe.js and the checkout Payment Element

FieldTypeRequiredDescription
publishable_keystringyesPublishable API key for Stripe.js

SubjectDetailResponse ​

A subject with its spec and the priced fields behind its price.

FieldTypeRequiredDescription
account_idstringyesAccount billed for this subject
anchor_dayinteger or nullnoFIXED only: day of the month the cycle renews on, or the last day of a shorter month Minimum: 1. Maximum: 31.
base_priceintegeryesBase price per cycle of the package, micro-USD
charge_basisstringyesFIXED (exact price per calendar cycle) or METERED (rate times active time) Values: FIXED, METERED.
created_atstringyesCreation time of the subject ISO-8601 date-time.
current_period_endstring or nullnoEnd of the current billing cycle ISO-8601 date-time.
current_period_startstring or nullnoStart of the current billing cycle ISO-8601 date-time.
cycle_countinteger or nullnoFIXED only: number of cycle units per billing period
cycle_priceinteger or nullnoFIXED only: amount charged per cycle, micro-USD
cycle_unitstring or nullnoFIXED only: calendar cycle unit, MONTH or YEAR
external_refstring or nullnoExternal collector reference, null when billing owns the meter
idstringyesBilling subject id
last_tick_atstring or nullnoTime of the most recent metered accrual ISO-8601 date-time.
package_codestring or nullnoSKU of the package the subject is on, null when it was not bought from the catalog
paid_through_atstring or nullnoFixed-prepaid subjects: the time coverage is paid up to ISO-8601 date-time.
partsSubjectPartView[]yesOne line per field, with what it contributes to the price
payment_modestringyesPREPAID or POSTPAID Values: PREPAID, POSTPAID.
rateinteger or nullnoMETERED only: rate per active hour, micro-USD
resource_idstring or nullnoUpstream resource id, null for a subject bought through an order
resource_kindstringyesKind of resource being billed Values: SERVER, IP_ADDRESS.
resource_namestringyesName of the billed resource, retained even once the resource is gone
specobject of objectyesEvery field the subject carries, keyed by field code: numbers, enum names and booleans
statestringyesACTIVE, SUSPENDED or TERMINATED Values: ACTIVE, SUSPENDED, TERMINATED.
suspend_reasonstring or nullnoBILLING or OPERATIONAL while the subject is suspended Values: BILLING, OPERATIONAL.
suspended_atstring or nullnoSuspension time, null while the subject is not suspended ISO-8601 date-time.
terminated_atstring or nullnoTermination time, null until the subject is terminated ISO-8601 date-time.
userUserSimpleyesUser the account bills for
workspaceWorkspaceSimple or nullnoWorkspace the subject belongs to

SubjectPartView ​

One field of a subject, with its priced contribution.

FieldTypeRequiredDescription
amountintegeryesThis part's contribution to the charge, micro-USD. 0 when bundled
idstringyesSubject part id
part_codestringyesField code
quantityinteger or nullnoValue of a numeric field
rate_card_idstring or nullnoRate card that priced this part, for audit
subject_idstringyesSubject this part belongs to
unit_priceintegeryesMonthly rate snapshot, micro-USD. 0 when bundled into the subject base price
valuestring or nullnoValue of an enum or boolean field

SubjectTransitionResponse ​

A move the subject's package offers, priced for this subject.

FieldTypeRequiredDescription
created_atstringyesCreation time ISO-8601 date-time.
directionstringyesUPGRADE or DOWNGRADE Values: UPGRADE, DOWNGRADE.
eligiblebooleanyesWhether an upgrade order for this move, with no field changes, would be accepted now
idstringyesTransition id
new_priceinteger or nullnoPrice after the move with the subject's current values kept in the target's open fields, micro-USD: per cycle for FIXED, per active hour for METERED. Null when not eligible
prorated_deltainteger or nullnoAmount that a move now settles for the rest of the paid cycle, micro-USD: positive is charged, negative is refunded to the wallet. 0 unless the subject is FIXED PREPAID. Null when not eligible
reasonstring or nullnoWhy the move is refused, the same message the upgrade order returns. Null when eligible
targetPackageDetailResponseyesThe package the move goes to, in the same shape as a package list item

SubjectUsageResponse ​

A metered subject with the usage it accrued over the requested window.

FieldTypeRequiredDescription
account_idstringyesAccount billed for this subject
anchor_dayinteger or nullnoFIXED only: day of the month the cycle renews on, or the last day of a shorter month Minimum: 1. Maximum: 31.
base_priceintegeryesBase price per cycle of the package, micro-USD
charge_basisstringyesFIXED (exact price per calendar cycle) or METERED (rate times active time) Values: FIXED, METERED.
created_atstringyesCreation time of the subject ISO-8601 date-time.
current_period_endstring or nullnoEnd of the current billing cycle ISO-8601 date-time.
current_period_startstring or nullnoStart of the current billing cycle ISO-8601 date-time.
cycle_countinteger or nullnoFIXED only: number of cycle units per billing period
cycle_priceinteger or nullnoFIXED only: amount charged per cycle, micro-USD
cycle_unitstring or nullnoFIXED only: calendar cycle unit, MONTH or YEAR
external_refstring or nullnoExternal collector reference, null when billing owns the meter
idstringyesBilling subject id
last_tick_atstring or nullnoTime of the most recent metered accrual ISO-8601 date-time.
package_codestring or nullnoSKU of the package the subject is on, null when it was not bought from the catalog
paid_through_atstring or nullnoFixed-prepaid subjects: the time coverage is paid up to ISO-8601 date-time.
payment_modestringyesPREPAID or POSTPAID Values: PREPAID, POSTPAID.
rateinteger or nullnoMETERED only: rate per active hour, micro-USD
resource_idstring or nullnoUpstream resource id, null for a subject bought through an order
resource_kindstringyesKind of resource being billed Values: SERVER, IP_ADDRESS.
resource_namestringyesName of the billed resource, retained even once the resource is gone
statestringyesACTIVE, SUSPENDED or TERMINATED Values: ACTIVE, SUSPENDED, TERMINATED.
suspend_reasonstring or nullnoBILLING or OPERATIONAL while the subject is suspended Values: BILLING, OPERATIONAL.
suspended_atstring or nullnoSuspension time, null while the subject is not suspended ISO-8601 date-time.
terminated_atstring or nullnoTermination time, null until the subject is terminated ISO-8601 date-time.
usage_amountintegeryesCharge accrued in the window, micro-USD
usage_fromstringyesStart of the window, inclusive ISO-8601 date-time.
usage_minutesintegeryesMetered minutes accrued in the window
usage_tostringyesEnd of the window, exclusive ISO-8601 date-time.
userUserSimpleyesUser the account bills for
workspaceWorkspaceSimple or nullnoWorkspace the subject belongs to

SubjectView ​

A billable resource together with its billing terms and current state.

FieldTypeRequiredDescription
account_idstringyesAccount billed for this subject
anchor_dayinteger or nullnoFIXED only: day of the month the cycle renews on, or the last day of a shorter month Minimum: 1. Maximum: 31.
base_priceintegeryesBase price per cycle of the package, micro-USD
charge_basisstringyesFIXED (exact price per calendar cycle) or METERED (rate times active time) Values: FIXED, METERED.
created_atstringyesCreation time of the subject ISO-8601 date-time.
current_period_endstring or nullnoEnd of the current billing cycle ISO-8601 date-time.
current_period_startstring or nullnoStart of the current billing cycle ISO-8601 date-time.
cycle_countinteger or nullnoFIXED only: number of cycle units per billing period
cycle_priceinteger or nullnoFIXED only: amount charged per cycle, micro-USD
cycle_unitstring or nullnoFIXED only: calendar cycle unit, MONTH or YEAR
external_refstring or nullnoExternal collector reference, null when billing owns the meter
idstringyesBilling subject id
last_tick_atstring or nullnoTime of the most recent metered accrual ISO-8601 date-time.
package_codestring or nullnoSKU of the package the subject is on, null when it was not bought from the catalog
paid_through_atstring or nullnoFixed-prepaid subjects: the time coverage is paid up to ISO-8601 date-time.
payment_modestringyesPREPAID or POSTPAID Values: PREPAID, POSTPAID.
rateinteger or nullnoMETERED only: rate per active hour, micro-USD
resource_idstring or nullnoUpstream resource id, null for a subject bought through an order
resource_kindstringyesKind of resource being billed Values: SERVER, IP_ADDRESS.
resource_namestringyesName of the billed resource, retained even once the resource is gone
statestringyesACTIVE, SUSPENDED or TERMINATED Values: ACTIVE, SUSPENDED, TERMINATED.
suspend_reasonstring or nullnoBILLING or OPERATIONAL while the subject is suspended Values: BILLING, OPERATIONAL.
suspended_atstring or nullnoSuspension time, null while the subject is not suspended ISO-8601 date-time.
terminated_atstring or nullnoTermination time, null until the subject is terminated ISO-8601 date-time.
userUserSimpleyesUser the account bills for
workspaceWorkspaceSimple or nullnoWorkspace the subject belongs to

UsageRecordView ​

Metered usage for a billing subject over a single period, and the charge it produced.

FieldTypeRequiredDescription
account_idstringyesAccount billed for the usage
amountintegeryesCharge for the metered minutes, micro-USD
created_atstringyesCreation time of the usage record ISO-8601 date-time.
idstringyesUsage record id
invoice_idstring or nullnoInvoice this usage is rolled up into, null until it is invoiced
ledger_entry_idstring or nullnoLedger entry this usage is settled under, null until it is settled
minutesintegeryesMetered minutes in the period
period_endstringyesEnd of the metered period ISO-8601 date-time.
period_startstringyesStart of the metered period ISO-8601 date-time.
rateintegeryesRate applied to the period, micro-USD per active hour
subject_idstringyesBilling subject the usage is metered for

UserSimple ​

User reference

FieldTypeRequiredDescription
idstringyesUser ID
namestringyesUser's name

WalletView ​

An account's prepaid balance, credited by top-ups and drawn down by charges.

FieldTypeRequiredDescription
account_idstringyesAccount this wallet belongs to
balanceintegeryesCurrent balance, micro-USD. negative when the account is overdrawn
currencystringyesISO currency code of the balance
idstringyesWallet id
unbilled_usageintegeryesMetered usage already drawn from the balance but not yet posted as a USAGE_CHARGE movement, micro-USD. The balance is authoritative
updated_atstringyesWhen the balance last changed ISO-8601 date-time.
userUserSimpleyesUser the account bills for

WorkspaceSimple ​

FieldTypeRequiredDescription
idstringyes
namestringyes