OpenMeter Customers

List credit transactions

List credit transactions for a customer.

Returns an immutable, chronological record of credit movements: funded credits and consumed credits. Transactions are returned in reverse chronological order by default.

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

Path parameters

customerIdstring required

ULID (Universally Unique Lexicographically Sortable Identifier).

Example:01G65Z755AFWAKHE12NY0CQ9FH

Query parameters

sizeinteger

The number of items to include per page.

afterstring

Request the next page of data, starting with the item after this parameter.

beforestring

Request the previous page of data, starting with the item before this parameter.

type'funded' | 'consumed' | 'expired' | 'voided'

The type of the credit transaction.

  • funded: Credit granted and available for consumption.
  • consumed: Credit consumed by usage or fees.
  • expired: Credit removed because it expired before being used.
  • voided: Credit removed because the grant was voided before being used.

Filter credit transactions returned in the response.

{
  "currency": "USD"
}

Response

Cursor paginated response.

Example response

{
  "data": [
    {
      "id": "01G65Z755AFWAKHE12NY0CQ9FH",
      "labels": {
        "env": "test"
      },
      "created_at": "2023-01-01T01:01:01.001Z",
      "booked_at": "2023-01-01T01:01:01.001Z",
      "currency": "USD"
    }
  ],
  "meta": {
    "page": {
      "size": 10
    }
  }
}

Changes

Changed in 6 of the 62 revisions of this API.439

  • v3bd7fb102768411See the full diff
    • added CurrencyCode BillingCurrencyCodeCustom to the data/items/currency/allOf[BillingCurrencyCode]/ response property oneOf list for the response status 200

      response-property-one-of-added

    • removed CurrencyCode BillingCurrencyCodeCustom from the data/items/currency/allOf[BillingCurrencyCode]/ response property anyOf list for the response status 200

      response-property-any-of-removed

  • v3b4f5102c436d112See the full diff
    • the data/items/currency/allOf[BillingCurrencyCode]/ response's property type/format changed from string/ to / for status 200

      response-property-type-changed

    • for the query request parameter filter, the type/format of property currency/allOf[BillingCurrencyCode]/ was changed from string/ to /

      request-parameter-property-type-changed

    • removed CurrencyCode from the data/items/currency/allOf[BillingCurrencyCode]/ response property allOf list for the response status 200

      response-property-all-of-removed

    • added CurrencyCode BillingCurrencyCodeCustom to the data/items/currency/allOf[BillingCurrencyCode]/ response property anyOf list for the response status 200

      response-property-any-of-added

  • v33886c8ba940411See the full diff
    • added the new voided enum value to the data/items/type/allOf[BillingCreditTransactionType]/ response property for the response status 200

      response-property-enum-value-added

    • added the enum value voided to the property type/allOf[BillingCreditTransactionType]/ of the query request parameter filter

      request-parameter-property-enum-value-added

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

      request-parameter-property-type-generalized

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

      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

  • v355836d0ad2f511See the full diff
    • added the new expired enum value to the data/items/type/allOf[BillingCreditTransactionType]/ response property for the response status 200

      response-property-enum-value-added

    • added the enum value expired to the property type/allOf[BillingCreditTransactionType]/ of the query request parameter filter

      request-parameter-property-enum-value-added

  • v39d0042cb381522See the full diff
    • removed the enum value expired from the property type/allOf[BillingCreditTransactionType]/ of the query request parameter filter

      request-parameter-property-enum-value-removed

    • removed the enum value voided from the property type/allOf[BillingCreditTransactionType]/ of the query request parameter filter

      request-parameter-property-enum-value-removed

    • removed the expired enum value from the data/items/type/allOf[BillingCreditTransactionType]/ response property for the response status 200

      response-property-enum-value-removed

    • removed the voided enum value from the data/items/type/allOf[BillingCreditTransactionType]/ response property for the response status 200

      response-property-enum-value-removed

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