Documentation menu

Payments

The environment's payments, top-ups and auto-refills together.

what they came to, and those refunded or disputed.

OperationMethodSDK
Summarize paymentsGEThixel.payments.summary
List refunded and disputed paymentsGEThixel.payments.listReversals

Summarize payments#

GET/v1/payments/summaryhixel.payments.summary

The environment's top-ups and auto-refills created within the range, by status: counts, amounts, and what refunds and disputes took back.

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
from requiredquerystring (date-time)The start of the range, inclusive.
to requiredquerystring (date-time)The end of the range, exclusive: at most 92 days after from.

Response 200: PaymentOutcomes

FieldTypeDescription
from requiredstring (date-time)
to requiredstring (date-time)
top_ups requiredarray of object
top_ups[].status required"creating" | "pending" | "processing" | "succeeded" | "failed" | "expired"Where a top-up's payment stands: creating until Stripe answered the session's creation, pending while its Checkout session is open, processing once completed with a payment still clearing, succeeded once credited, failed (the payment failed) or expired (never paid).
top_ups[].count requiredinteger
top_ups[].amount_micros requiredstringAn amount of micro-USD (millionths of a US dollar) as a decimal string: "1500000" is 1.50 USD. Never a JSON number.
top_ups[].refunded_micros requiredstringAn amount of micro-USD (millionths of a US dollar) as a decimal string: "1500000" is 1.50 USD. Never a JSON number.
top_ups[].disputed_micros requiredstringAn amount of micro-USD (millionths of a US dollar) as a decimal string: "1500000" is 1.50 USD. Never a JSON number.
auto_refills requiredarray of object
auto_refills[].status required"pending" | "processing" | "succeeded" | "failed" | "skipped_cap" | "canceled" | …Where an auto-refill stands: pending until Stripe answered its payment's creation, processing while the payment clears, succeeded once credited, failed (declined, or the bank asked for authentication, which cannot happen off-session), skipped_cap (the month's cap left no room; nothing was charged), canceled (nothing was charged: the customer, the connection or the settings no longer allowed it, before Stripe was asked or after Stripe canceled its payment) or needs_attention (Stripe may hold a payment the platform could not read back in time: re-read daily and by its webhook, and no other refill of the wallet starts until it is resolved).
auto_refills[].count requiredinteger
auto_refills[].amount_micros requiredstringAn amount of micro-USD (millionths of a US dollar) as a decimal string: "1500000" is 1.50 USD. Never a JSON number.
auto_refills[].refunded_micros requiredstringAn amount of micro-USD (millionths of a US dollar) as a decimal string: "1500000" is 1.50 USD. Never a JSON number.
auto_refills[].disputed_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.
    • invalid_range: from must be before to, and a summary covers at most 92 days.
    • 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/payments/summary?from=2026-11-01T00%3A00%3A00Z&to=2026-12-01T00%3A00%3A00Z" \
  -H "Authorization: Bearer $HIXEL_API_KEY"

List refunded and disputed payments#

GET/v1/payments/reversalshixel.payments.listReversals

A page of the environment's top-ups and auto-refills with refunds or a dispute, newest first.

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
reversalquery"refunded" | "disputed"Only payments with refunds (refunded) or a dispute (disputed); both when left out.
customerquerystringOnly this customer's payments, by your id for it.
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: PaymentReversalList

FieldTypeDescription
data requiredarray of PaymentReversal
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/payments/reversals" \
  -H "Authorization: Bearer $HIXEL_API_KEY"