NewHost Docs

API reference

Billing

Invoices and the prepaid wallet.

List invoices

GET/v1/invoices

Requires a secret key with the read scope.

Parameters

NameInTypeDescription
limitqueryintegerItems per page, 1-100 (default 50).
offsetqueryintegerItems to skip (default 0).
statusquerystringUNPAID, PAID or VOID.

Request

curl "https://api.newhost.co.za/v1/invoices" \
  -H "Authorization: Bearer sk_live_..."

Response

{
  "data": [
    {
      "id": "clx8inv0001",
      "number": "NH-2026-000123",
      "kind": "PLAN",
      "status": "PAID",
      "amount": "114.99",
      "vat": "15.00",
      "issuedAt": "2026-09-01T08:00:00.000Z",
      "dueAt": "2026-09-08T08:00:00.000Z",
      "paidAt": "2026-09-01T08:02:11.000Z"
    }
  ],
  "has_more": false
}

Retrieve an invoice

GET/v1/invoices/{id}

Requires a secret key with the read scope.

Parameters

NameInTypeDescription
idrequiredpathstringThe invoice ID.

Request

curl "https://api.newhost.co.za/v1/invoices/ID" \
  -H "Authorization: Bearer sk_live_..."

Response

{
  "data": {
    "id": "clx8inv0001",
    "number": "NH-2026-000123",
    "kind": "PLAN",
    "status": "PAID",
    "amount": "114.99",
    "vat": "15.00",
    "issuedAt": "2026-09-01T08:00:00.000Z",
    "dueAt": "2026-09-08T08:00:00.000Z",
    "paidAt": "2026-09-01T08:02:11.000Z",
    "lines": [
      {
        "description": "Starter hosting plan (monthly)",
        "amount": "99.99"
      }
    ]
  }
}

Retrieve the wallet

GET/v1/wallet

Requires a secret key with the read scope.

Request

curl "https://api.newhost.co.za/v1/wallet" \
  -H "Authorization: Bearer sk_live_..."

Response

{
  "data": {
    "balance": "250.00",
    "autoTopUpEnabled": false,
    "transactions": [
      {
        "amount": "250.00",
        "balanceAfter": "250.00",
        "type": "TOPUP",
        "description": "Wallet top-up",
        "createdAt": "2026-09-01T08:00:00.000Z"
      }
    ]
  }
}

Next: Webhooks →