Payments
The environment's payments, top-ups and auto-refills together.
what they came to, and those refunded or disputed.
| Operation | Method | SDK |
|---|---|---|
| Summarize payments | GET | hixel.payments.summary |
| List refunded and disputed payments | GET | hixel.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
| Name | In | Type | Description |
|---|---|---|---|
from required | query | string (date-time) | The start of the range, inclusive. |
to required | query | string (date-time) | The end of the range, exclusive: at most 92 days after from. |
Response 200: PaymentOutcomes
| Field | Type | Description |
|---|---|---|
from required | string (date-time) | |
to required | string (date-time) | |
top_ups required | array 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 required | integer | |
top_ups[].amount_micros required | string | An 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 required | string | An 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 required | string | An amount of micro-USD (millionths of a US dollar) as a decimal string: "1500000" is 1.50 USD. Never a JSON number. |
auto_refills required | array 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 required | integer | |
auto_refills[].amount_micros required | string | An 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 required | string | An 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 required | string | An 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;paramnames the field.invalid_range:frommust be beforeto, and a summary covers at most 92 days.environment_required: a project key was sent withoutx-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 themanagementscope.management_scope_required: the environment's key does not have themanagementscope.
- 404
environment_not_found:x-hixel-environmentnames 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"const paymentOutcomes = await hixel.payments.summary({
from: "2026-11-01T00:00:00Z",
to: "2026-12-01T00:00:00Z",
});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
| Name | In | Type | Description |
|---|---|---|---|
reversal | query | "refunded" | "disputed" | Only payments with refunds (refunded) or a dispute (disputed); both when left out. |
customer | query | string | Only this customer's payments, by your id for it. |
cursor | query | string | The next_cursor of the previous page, to read the next one; left out for the first page. Pass the same filters with it. |
limit | query | integer | How many items the page holds: an integer from 1 to 100; 50 when left out. |
Response 200: PaymentReversalList
| Field | Type | Description |
|---|---|---|
data required | array of PaymentReversal | |
next_cursor required | string | null | Pass back as cursor for the next page; null on the last page. |
Errors
- 400
invalid_request: The request is malformed or fails validation;paramnames the field.invalid_cursor: The cursor is not one this list gave.environment_required: a project key was sent withoutx-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 themanagementscope.management_scope_required: the environment's key does not have themanagementscope.
- 404
environment_not_found:x-hixel-environmentnames 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"for await (const item of hixel.payments.listReversals()) {
console.log(item);
}