Skip to content
Odinex Cloud
API reference

Billing

GET
/billing

Authorization

cookieAuth
cookieodx_session<token>

Query Parameters

organization_id?integer

Defaults to your personal organization

Formatint64

Response Body

Billing overview

application/json
  1. response
billing*
curl -X GET "https://example.com/billing"
{  "billing": {    "organization_id": 0,    "currency": "EUR",    "balance": "12.345600",    "hourly_burn": "string",    "hours_left": 0,    "month_to_date": "string",    "forecast_month": "string",    "status": "active",    "suspension_reason": "string",    "suspend_at": "2019-08-24T14:15:22Z",    "fee": {      "mode": "customer_pays",      "percent": "2.90",      "fixed": "0.250000"    },    "min_topup": "string",    "max_topup": "string",    "payments_enabled": true,    "stripe_publishable_key": "string",    "auto_recharge": {      "enabled": true,      "threshold": "string",      "amount": "string",      "card": "visa •••• 4242",      "failures": 0    },    "limits": {      "property1": {        "limit": 0,        "used": 0      },      "property2": {        "limit": 0,        "used": 0      }    }  }}

List transactions

GET
/billing/transactions

Authorization

cookieAuth
cookieodx_session<token>

Query Parameters

organization_id?integer

Defaults to your personal organization

Formatint64
page?integer
Range1 <= value
Default1
per_page?integer
Range1 <= value <= 50
Default25

Response Body

Wallet ledger, newest first

application/json
  1. response
transactions*array<>
meta*
curl -X GET "https://example.com/billing/transactions"
{  "transactions": [    {      "id": 0,      "amount": "string",      "balance_after": "string",      "kind": "topup",      "description": "string",      "created": "2019-08-24T14:15:22Z"    }  ],  "meta": {    "pagination": {      "page": 0,      "per_page": 0,      "previous_page": 0,      "next_page": 0,      "last_page": 0,      "total_entries": 0    }  }}
GET
/billing/usage

Authorization

cookieAuth
cookieodx_session<token>

Query Parameters

organization_id?integer

Defaults to your personal organization

Formatint64
month?string

YYYY-MM, defaults to the current month

Match^\d{4}-\d{2}$

Response Body

Usage

application/json
  1. response
usage*
curl -X GET "https://example.com/billing/usage"
{  "usage": {    "month": "2026-10",    "total": "string",    "lines": [      {        "description": "string",        "resource_type": "string",        "resource_id": 0,        "project_id": 0,        "sku": "string",        "hours": 0,        "hourly": "string",        "monthly_cap": "string",        "capped": true,        "amount": "string",        "from": "2019-08-24T14:15:22Z",        "to": "2019-08-24T14:15:22Z"      }    ]  }}
POST
/billing/topups

Authorization

cookieAuth
cookieodx_session<token>

Request Body

application/json
  1. body
organization_id?integer
Formatint64
amount*string

Amount to credit in EUR, e.g. "20.00"

Response Body

Payment created

application/json
  1. response
topup*
curl -X POST "https://example.com/billing/topups" \  -H "Content-Type: application/json" \  -d '{    "amount": "20.00"  }'
{  "topup": {    "payment_id": 0,    "client_secret": "string",    "amount": "string",    "fee": "string",    "total": "string",    "currency": "string",    "publishable_key": "string"  }}
POST
/billing/cards/setup

Authorization

cookieAuth
cookieodx_session<token>

Query Parameters

organization_id?integer

Defaults to your personal organization

Formatint64

Response Body

SetupIntent created

application/json
  1. response
client_secret*string
publishable_key?string|null
curl -X POST "https://example.com/billing/cards/setup"
{  "client_secret": "string",  "publishable_key": "string"}
PUT
/billing/auto_recharge

Authorization

cookieAuth
cookieodx_session<token>

Query Parameters

organization_id?integer

Defaults to your personal organization

Formatint64

Request Body

application/json
  1. body
enabled*boolean
threshold?string

Top up when the balance falls below this

amount?string
payment_method_id?string

The pm_… returned by confirmSetup; omit to keep the saved card

Response Body

Saved

application/json
  1. response
auto_recharge*
curl -X PUT "https://example.com/billing/auto_recharge" \  -H "Content-Type: application/json" \  -d '{    "enabled": true  }'
{  "auto_recharge": {    "enabled": true,    "threshold": "string",    "amount": "string",    "card": "visa •••• 4242",    "failures": 0  }}

List payments

GET
/billing/payments

Authorization

cookieAuth
cookieodx_session<token>

Query Parameters

organization_id?integer

Defaults to your personal organization

Formatint64

Response Body

Payments, newest first

application/json
  1. response
payments*array<>
curl -X GET "https://example.com/billing/payments"
{  "payments": [    {      "id": 0,      "status": "pending",      "provider": "string",      "amount": "string",      "fee": "string",      "total": "string",      "receipt_number": "string",      "failure_message": "string",      "created": "2019-08-24T14:15:22Z"    }  ]}

List statements

GET
/billing/statements

Authorization

cookieAuth
cookieodx_session<token>

Query Parameters

organization_id?integer

Defaults to your personal organization

Formatint64

Response Body

Monthly statements

application/json
  1. response
statements*array<>
curl -X GET "https://example.com/billing/statements"
{  "statements": [    {      "id": 0,      "month": "2026-10",      "total": "string",      "issued": "2019-08-24T14:15:22Z"    }  ]}

Get statement

GET
/billing/statements/{id}

Authorization

cookieAuth
cookieodx_session<token>

Path Parameters

id*integer
Formatint64

Query Parameters

organization_id?integer

Defaults to your personal organization

Formatint64

Response Body

Statement with its lines

application/json
  1. response
statement*
curl -X GET "https://example.com/billing/statements/0"
{  "statement": {    "id": 0,    "month": "2026-10",    "total": "string",    "issued": "2019-08-24T14:15:22Z",    "lines": [      {        "description": "string",        "resource_type": "string",        "resource_id": 0,        "project_id": 0,        "sku": "string",        "hours": 0,        "hourly": "string",        "monthly_cap": "string",        "capped": true,        "amount": "string",        "from": "2019-08-24T14:15:22Z",        "to": "2019-08-24T14:15:22Z"      }    ]  }}