Skip to content

API: Billing

Generated from the API's OpenAPI schema. Paths are relative to https://cloud.tebibhost.com. Authentication, errors, pagination and idempotency are on the API overview.

GET/api/v1/fx-rates

List Fx Rates (listFxRates)

IAM action: none (public, no sign-in)

Responses

  • 200 OK (array of FxRateOut)
  • 400 Invalid request (ErrorOut)
  • 401 Not authenticated (ErrorOut)
  • 403 Access denied: the error names the action and the resource (ErrorOut)
  • 404 Not found (also: the resource belongs to another organization) (ErrorOut)
  • 409 Conflict or quota exceeded (ErrorOut)
  • 422 Idempotency key reused for a different request (ErrorOut)
  • 429 Rate limited (ErrorOut)

GET/api/v1/orgs/{organization_id}/billing

Get Billing (getBilling)

IAM action: billing:GetBilling

ParameterInTypeDescription
organization_id requiredpathstring

Responses

  • 200 OK (BillingOut)
  • 400 Invalid request (ErrorOut)
  • 401 Not authenticated (ErrorOut)
  • 403 Access denied: the error names the action and the resource (ErrorOut)
  • 404 Not found (also: the resource belongs to another organization) (ErrorOut)
  • 409 Conflict or quota exceeded (ErrorOut)
  • 422 Idempotency key reused for a different request (ErrorOut)
  • 429 Rate limited (ErrorOut)
Fields of BillingOut
FieldTypeDescription
account_referencestring
availablestring
available_microinteger
contactsarray of string
credit_limit_microinteger
currencystring
organization_idstring
payment_methodsarray of PaymentMethodOut
promostring
promo_microinteger
run_rate_micro_per_hourinteger (nullable)
runway_hoursnumber (nullable)
statestring
state_sincestring (date-time)
walletstring
wallet_microinteger

PATCH/api/v1/orgs/{organization_id}/billing

Update Billing (updateBilling)

IAM action: billing:UpdateBilling

ParameterInTypeDescription
organization_id requiredpathstring

Request body (JSON, BillingPatch)

FieldTypeDescription
contacts requiredarray of string

Responses

  • 200 OK (BillingOut)
  • 400 Invalid request (ErrorOut)
  • 401 Not authenticated (ErrorOut)
  • 403 Access denied: the error names the action and the resource (ErrorOut)
  • 404 Not found (also: the resource belongs to another organization) (ErrorOut)
  • 409 Conflict or quota exceeded (ErrorOut)
  • 422 Idempotency key reused for a different request (ErrorOut)
  • 429 Rate limited (ErrorOut)
Fields of BillingOut
FieldTypeDescription
account_referencestring
availablestring
available_microinteger
contactsarray of string
credit_limit_microinteger
currencystring
organization_idstring
payment_methodsarray of PaymentMethodOut
promostring
promo_microinteger
run_rate_micro_per_hourinteger (nullable)
runway_hoursnumber (nullable)
statestring
state_sincestring (date-time)
walletstring
wallet_microinteger

GET/api/v1/orgs/{organization_id}/billing/statements

List Statements (listStatements)

Monthly statements, newest first.

IAM action: billing:ListStatements

ParameterInTypeDescription
organization_id requiredpathstring
limitqueryinteger (nullable)
cursorquerystring (nullable)

Responses

  • 200 OK (Page_StatementSummaryOut_)
  • 400 Invalid request (ErrorOut)
  • 401 Not authenticated (ErrorOut)
  • 403 Access denied: the error names the action and the resource (ErrorOut)
  • 404 Not found (also: the resource belongs to another organization) (ErrorOut)
  • 409 Conflict or quota exceeded (ErrorOut)
  • 422 Idempotency key reused for a different request (ErrorOut)
  • 429 Rate limited (ErrorOut)
Fields of Page_StatementSummaryOut_
FieldTypeDescription
itemsarray of StatementSummaryOut
next_cursorstring (nullable)

GET/api/v1/orgs/{organization_id}/billing/statements/{statement_id}

Get Statement (getStatement)

IAM action: billing:GetStatement

ParameterInTypeDescription
organization_id requiredpathstring
statement_id requiredpathstring

Responses

  • 200 OK (StatementOut)
  • 400 Invalid request (ErrorOut)
  • 401 Not authenticated (ErrorOut)
  • 403 Access denied: the error names the action and the resource (ErrorOut)
  • 404 Not found (also: the resource belongs to another organization) (ErrorOut)
  • 409 Conflict or quota exceeded (ErrorOut)
  • 422 Idempotency key reused for a different request (ErrorOut)
  • 429 Rate limited (ErrorOut)
Fields of StatementOut
FieldTypeDescription
closing_microinteger
dataobject
idstring
issued_atstring (date-time)
numberstring
opening_microinteger
period_endstring (date-time)
period_startstring (date-time)
sha256string

GET/api/v1/orgs/{organization_id}/billing/statements/{statement_id}/pdf

Get Statement Pdf (getStatementPdf)

IAM action: billing:GetStatement

ParameterInTypeDescription
organization_id requiredpathstring
statement_id requiredpathstring

Responses

  • 200 The PDF (application/pdf)
  • 400 Invalid request (ErrorOut)
  • 401 Not authenticated (ErrorOut)
  • 403 Access denied: the error names the action and the resource (ErrorOut)
  • 404 Not found (also: the resource belongs to another organization) (ErrorOut)
  • 409 Conflict or quota exceeded (ErrorOut)
  • 422 Idempotency key reused for a different request (ErrorOut)
  • 429 Rate limited (ErrorOut)

GET/api/v1/orgs/{organization_id}/billing/top-ups

List Top Ups (listTopUps)

IAM action: billing:ListTopUps

ParameterInTypeDescription
organization_id requiredpathstring
limitqueryinteger (nullable)
cursorquerystring (nullable)

Responses

  • 200 OK (Page_TopUpOut_)
  • 400 Invalid request (ErrorOut)
  • 401 Not authenticated (ErrorOut)
  • 403 Access denied: the error names the action and the resource (ErrorOut)
  • 404 Not found (also: the resource belongs to another organization) (ErrorOut)
  • 409 Conflict or quota exceeded (ErrorOut)
  • 422 Idempotency key reused for a different request (ErrorOut)
  • 429 Rate limited (ErrorOut)
Fields of Page_TopUpOut_
FieldTypeDescription
itemsarray of TopUpOut
next_cursorstring (nullable)

POST/api/v1/orgs/{organization_id}/billing/top-ups

Create Top Up (createTopUp)

Start a payment. For M-Pesa (stk_push) the phone gets a PIN prompt; for Chapa (checkout, ETB or USD) send the payer to instruction.details.url. Then poll the top-up until it is succeeded, failed or expired.

IAM action: billing:CreateTopUp

ParameterInTypeDescription
organization_id requiredpathstring

Request body (JSON, TopUpIn)

FieldTypeDescription
amount requiredstringIn the currency, e.g. '500' or '500.00'.
currencystring Default: "KES".
methodstring Default: "stk_push".
phonestringM-Pesa: the paying phone number, e.g. 0712345678. Not used by Chapa. Default: "".
providerstring Default: "mpesa".

Responses

  • 201 Created (TopUpOut)
  • 400 Invalid request (ErrorOut)
  • 401 Not authenticated (ErrorOut)
  • 403 Access denied: the error names the action and the resource (ErrorOut)
  • 404 Not found (also: the resource belongs to another organization) (ErrorOut)
  • 409 Conflict or quota exceeded (ErrorOut)
  • 422 Idempotency key reused for a different request (ErrorOut)
  • 429 Rate limited (ErrorOut)
Fields of TopUpOut
FieldTypeDescription
amount_minorinteger
created_atstring (date-time)
currencystring
idstring
instructionobject (nullable)
methodstring
payerstring
providerstring
provider_referencestring
ratestring (nullable)
statestring
status_messagestring
updated_atstring (date-time)
usd_microinteger (nullable)

GET/api/v1/orgs/{organization_id}/billing/top-ups/{topup_id}

Get Top Up (getTopUp)

IAM action: billing:GetTopUp

ParameterInTypeDescription
organization_id requiredpathstring
topup_id requiredpathstring

Responses

  • 200 OK (TopUpOut)
  • 400 Invalid request (ErrorOut)
  • 401 Not authenticated (ErrorOut)
  • 403 Access denied: the error names the action and the resource (ErrorOut)
  • 404 Not found (also: the resource belongs to another organization) (ErrorOut)
  • 409 Conflict or quota exceeded (ErrorOut)
  • 422 Idempotency key reused for a different request (ErrorOut)
  • 429 Rate limited (ErrorOut)
Fields of TopUpOut
FieldTypeDescription
amount_minorinteger
created_atstring (date-time)
currencystring
idstring
instructionobject (nullable)
methodstring
payerstring
providerstring
provider_referencestring
ratestring (nullable)
statestring
status_messagestring
updated_atstring (date-time)
usd_microinteger (nullable)

GET/api/v1/orgs/{organization_id}/billing/top-ups/{topup_id}/receipt

Get Top Up Receipt (getTopUpReceipt)

The receipt of a succeeded top-up (404 until it has succeeded).

IAM action: billing:GetTopUp

ParameterInTypeDescription
organization_id requiredpathstring
topup_id requiredpathstring

Responses

  • 200 OK (object)
  • 400 Invalid request (ErrorOut)
  • 401 Not authenticated (ErrorOut)
  • 403 Access denied: the error names the action and the resource (ErrorOut)
  • 404 Not found (also: the resource belongs to another organization) (ErrorOut)
  • 409 Conflict or quota exceeded (ErrorOut)
  • 422 Idempotency key reused for a different request (ErrorOut)
  • 429 Rate limited (ErrorOut)

GET/api/v1/orgs/{organization_id}/billing/top-ups/{topup_id}/receipt/pdf

Get Top Up Receipt Pdf (getTopUpReceiptPdf)

IAM action: billing:GetTopUp

ParameterInTypeDescription
organization_id requiredpathstring
topup_id requiredpathstring

Responses

  • 200 The PDF (application/pdf)
  • 400 Invalid request (ErrorOut)
  • 401 Not authenticated (ErrorOut)
  • 403 Access denied: the error names the action and the resource (ErrorOut)
  • 404 Not found (also: the resource belongs to another organization) (ErrorOut)
  • 409 Conflict or quota exceeded (ErrorOut)
  • 422 Idempotency key reused for a different request (ErrorOut)
  • 429 Rate limited (ErrorOut)

GET/api/v1/orgs/{organization_id}/billing/transactions

List Transactions (listTransactions)

Newest first.

IAM action: billing:ListTransactions

ParameterInTypeDescription
organization_id requiredpathstring
limitqueryinteger (nullable)
cursorquerystring (nullable)

Responses

  • 200 OK (Page_TransactionOut_)
  • 400 Invalid request (ErrorOut)
  • 401 Not authenticated (ErrorOut)
  • 403 Access denied: the error names the action and the resource (ErrorOut)
  • 404 Not found (also: the resource belongs to another organization) (ErrorOut)
  • 409 Conflict or quota exceeded (ErrorOut)
  • 422 Idempotency key reused for a different request (ErrorOut)
  • 429 Rate limited (ErrorOut)
Fields of Page_TransactionOut_
FieldTypeDescription
itemsarray of TransactionOut
next_cursorstring (nullable)

GET/api/v1/prices

List Prices (listPrices)

Prices in force now (USD per unit), upcoming changes, and included egress per VM.

IAM action: none (public, no sign-in)

Responses

  • 200 OK (PriceListOut)
  • 400 Invalid request (ErrorOut)
  • 401 Not authenticated (ErrorOut)
  • 403 Access denied: the error names the action and the resource (ErrorOut)
  • 404 Not found (also: the resource belongs to another organization) (ErrorOut)
  • 409 Conflict or quota exceeded (ErrorOut)
  • 422 Idempotency key reused for a different request (ErrorOut)
  • 429 Rate limited (ErrorOut)
Fields of PriceListOut
FieldTypeDescription
atstring (date-time)
currencystring
egress_allowancesarray of EgressAllowanceOut
hours_per_monthinteger
pricesarray of PriceOut
regionstring
scheduledarray of PriceOut