OpenMeter Customers

Get a customer's credit balance

Get a credit balance.

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

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

RFC3339 formatted date-time string in UTC.

Example response

{
  "retrieved_at": "2023-01-01T01:01:01.001Z",
  "balances": [
    {
      "currency": "USD"
    }
  ]
}

Changes

Changed in 6 of the 63 revisions of this API.5110

  • v3bd7fb102768411See the full diff
    • added to the ////// response property oneOf list for the response status

      response-property-one-of-added

    • removed from the ////// response property anyOf list for the response status

      response-property-any-of-removed

  • v3b4f5102c436d12See the full diff
    • the ////// response's property type changed from string to no type for status

      response-property-type-changed

    • removed from the ////// response property allOf list for the response status

      response-property-all-of-removed

    • added to the ////// response property anyOf list for the response status

      response-property-any-of-added

    • for the query request parameter filter, the format of property currency/allOf[subschema #1: String Field Filter Exact]/anyOf[subschema #2]/oeq was generalized from ArrayEncoding.commaDelimited to no format

      request-parameter-property-type-generalized

    • for the query request parameter filter, the format of property feature_key/allOf[StringFieldFilter]/anyOf[subschema #2]/ocontains was generalized from ArrayEncoding.commaDelimited to no format

      request-parameter-property-type-generalized

    • for the query request parameter filter, the format of property feature_key/allOf[StringFieldFilter]/anyOf[subschema #2]/oeq was generalized from ArrayEncoding.commaDelimited to no format

      request-parameter-property-type-generalized

    This revision also has 3 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • v3cf64127756eb12See the full diff
    • removed the required property // from the response with the status

      response-required-property-removed

    • added the required property // to the response with the status

      response-required-property-added

    • added the required property // to the response with the status

      response-required-property-added

    • added the new optional query request parameter timestamp

      new-optional-request-parameter

  • v39d0042cb3815211See the full diff
    • removed the required property // from the response with the status

      response-required-property-removed

    • removed the required property // from the response with the status

      response-required-property-removed

    • deleted the query request parameter timestamp

      request-parameter-removed

    • added the required property // to the response with the status

      response-required-property-added

    This revision also has 112 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog