OpenMeter Customers

Get a customer's credit balance

Changed on

Pre-release Endpoint This endpoint is currently in beta and is subject to change.

Get a credit balance.

get/v3/openmeter/customers/{customerId}/credits/balance

Request

  • Base URL: https://global.api.konghq.com
  • URL: https://global.api.konghq.com/v3/openmeter/customers/{customerId}/credits/balance
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer
    • HTTP bearer
    • HTTP bearer

Path parameters

customerIdstring required

ULID (Universally Unique Lexicographically Sortable Identifier).

Example:01G65Z755AFWAKHE12NY0CQ9FH

Query parameters

timestampstring date-time

RFC3339 formatted date-time string in UTC.

Example:2023-01-01T01:01:01.001Z

Return the credit balance as of this timestamp.

Defaults to the current time. Historical responses return live as zero because live charge impacts are only available for current balances.

Response

CreditBalances response.

retrieved_atstring date-time required

The timestamp of the balance retrieval.

Example response

{
  "retrieved_at": "2023-01-01T01:01:01.001Z",
  "balances": [
    {
      "currency": "USD",
      "custom_currency": {
        "id": "01G65Z755AFWAKHE12NY0CQ9FH"
      },
      "live": "200.00",
      "settled": "150.00",
      "pending": "50.00"
    }
  ]
}

Changes

    • breaking

      added to the / response property oneOf list for the response status

    • warning

      added the new key_invalid enum value to the ////// response property for the response status

    • warning

      added the new unique enum value to the ////// response property for the response status

    • warning

      added the new 400.00 enum value to the response property for the response status

    • warning

      added the new 403.00 enum value to the response property for the response status

    • warning

      added the new 404.00 enum value to the response property for the response status

    • info

      added the optional property // to the response with the status