Documentation menu

Events

What happened in the calling key's environment, as webhook events.

the same envelope every delivery sends, kept to be read back.

OperationMethodSDK
List eventsGEThixel.events.list
Get an eventGEThixel.events.get

List events#

GET/v1/eventshixel.events.list

A page of the environment's events, newest first, each exactly as its deliveries send it: how to catch up on what an endpoint missed.

Takes an environment key with the management scope, or a project key with the member role or higher, naming the environment in x-hixel-environment.

Parameters

NameInTypeDescription
typequery"wallet.balance_low" | "wallet.depleted" | "wallet.credited" | "wallet.grant_expired" | "wallet.credit_rejected" | "wallet.spend_limit_reached" | …Only events of this type.
cursorquerystringThe next_cursor of the previous page, to read the next one; left out for the first page. Pass the same filters with it.
limitqueryintegerHow many items the page holds: an integer from 1 to 100; 50 when left out.

Response 200: EventList

FieldTypeDescription
data requiredarray of Event
next_cursor requiredstring | nullPass back as cursor for the next page; null on the last page.

Errors

  • 400
    • invalid_request: The request is malformed or fails validation; param names the field.
    • invalid_cursor: The cursor is not one this list gave.
    • environment_required: a project key was sent without x-hixel-environment.
    • invalid_query: the request's path, query or body does not match its schema, or the body is not JSON or is over 1 MiB.
  • 401 api_key_required, invalid_api_key, expired_api_key: no key was sent; the key is unknown or revoked, or its project or environment is archived; or it has expired.
  • 403
    • key_inactive: the key was revoked or expired while the request ran, or an environment's key lost the management scope.
    • management_scope_required: the environment's key does not have the management scope.
  • 404 environment_not_found: x-hixel-environment names an environment outside the project key's project, an archived one, or another than the environment key's own.
  • 500 internal: an unexpected failure on the platform's side (internal_error); the details are logged, never returned.
  • 503 database_unavailable: A dependency, such as the database or Stripe, cannot be reached; retry later.
curl "https://api.hixel.dev/v1/events" \
  -H "Authorization: Bearer $HIXEL_API_KEY"

Get an event#

GET/v1/events/{id}hixel.events.get

The event, exactly as its deliveries send it.

Takes an environment key with the management scope, or a project key with the member role or higher, naming the environment in x-hixel-environment.

Parameters

NameInTypeDescription
id requiredpathstringThe event's id (evt_…).

Response 200: Event

FieldTypeDescription
id requiredstringThe event's id (evt_…), the same in every delivery of it: deduplicate on it.
object required"event"
type required"wallet.balance_low"
api_version required"2026-11-25"The version of the envelope and of data. Removing or retyping a field is a new version; adding one is not, so ignore fields you do not know.
created_at requiredstring (date-time)When the change that caused the event was made, in its transaction (to the millisecond).
environment requiredstringThe environment the event happened in (env_…).
data requiredobject
data.customer requiredstringYour id for the customer (its external_id), as every path takes it.
data.wallet_id requiredstringThe id of a customer's wallet (wal_…).
data.balance requiredobjectThe balance once the change that caused the event was applied.
data.balance.purchased_micros requiredstringAn amount of micro-USD (millionths of a US dollar) as a decimal string: "1500000" is 1.50 USD. Never a JSON number.
data.balance.grants_micros requiredstringAn amount of micro-USD (millionths of a US dollar) as a decimal string: "1500000" is 1.50 USD. Never a JSON number.
data.balance.total_micros requiredstringAn amount of micro-USD (millionths of a US dollar) as a decimal string: "1500000" is 1.50 USD. Never a JSON number.
data.threshold_micros requiredstringAn amount of micro-USD (millionths of a US dollar) as a decimal string: "1500000" is 1.50 USD. Never a JSON number.

Errors

  • 400
    • invalid_request: The request is malformed or fails validation; param names the field.
    • environment_required: a project key was sent without x-hixel-environment.
    • invalid_params: the request's path, query or body does not match its schema, or the body is not JSON or is over 1 MiB.
  • 401 api_key_required, invalid_api_key, expired_api_key: no key was sent; the key is unknown or revoked, or its project or environment is archived; or it has expired.
  • 403
    • key_inactive: the key was revoked or expired while the request ran, or an environment's key lost the management scope.
    • management_scope_required: the environment's key does not have the management scope.
  • 404
    • event_not_found: The resource does not exist in the key's environment; a resource outside it reads the same.
    • environment_not_found: x-hixel-environment names an environment outside the project key's project, an archived one, or another than the environment key's own.
  • 500 internal: an unexpected failure on the platform's side (internal_error); the details are logged, never returned.
  • 503 database_unavailable: A dependency, such as the database or Stripe, cannot be reached; retry later.
curl "https://api.hixel.dev/v1/events/evt_123" \
  -H "Authorization: Bearer $HIXEL_API_KEY"