Skip to main content
PayHubDeveloper docs
简体中文

List settlements

API contract v1.0.0

listSettlements
GET/v1/settlements
Required scopesfinance:read

The Developer role can't grant finance:read by default. Use a key created by an Owner or Admin.

Lists the settlements of the current merchant and environment. The platform generates settlements according to the configured rules, and the initial release has no self-service withdrawal API. Results are ordered by creation time descending, with ties broken by id descending, so the order is stable. It uses cursor pagination; created_gte is inclusive and created_lt is exclusive.

Request headers

Request headersRequiredFormatDescription
AuthorizationYesBearer <API_KEY>

Server-side key, to be used only on the merchant's server. The merchant and environment are derived from the key. A missing, invalid, revoked or expired key returns 401.

Query parameters

NameTypeRequiredDescription
status
stringNo

Filter by settlement status.

  • pending_review: Generated by the system and pending review; the selected merchant balance has been reserved atomically
  • approved: Approved and pending execution
  • rejected: Rejected in review; the reserved funds are released
  • paying: Handed over for execution, or the payout outcome isn't determined yet; the funds stay reserved
  • paid: Payout confirmed as successful after review
  • failed: The payout clearly didn't succeed this time; the reserved funds are released
  • canceled: Not sent out yet and canceled by an authorized user; the reserved funds are released
  • returned: The bank returned the payout after it had succeeded
  • More values may be added in the future. Don't treat a status you don't recognize as success.

Example: paid

currency
stringNo

Filter by currency.

Constraints: Format ^[A-Z]{3}$

Example: USD

limit
integerNo

Number of items per page. The default is 20 and the maximum is 100.

Constraints: 1–100Default 20

cursor
stringNo

The next_cursor from the previous page's response. An opaque string: don't parse it or build one yourself. Send the same filters as for the first page.

Constraints: Length 1–512

created_gte
string(date-time)No

Lower bound of the creation time (inclusive), as ISO 8601 with a time zone.

Example: 2026-09-23T00:00:00Z

created_lt
string(date-time)No

Upper bound of the creation time (exclusive), as ISO 8601 with a time zone.

Example: 2026-09-24T00:00:00Z

Request example

curl
curl -X GET 'https://api.fluxan.co/v1/settlements?limit=20' \
  -H 'Authorization: Bearer <TEST_SERVER_API_KEY>'

Placeholders to replace

  • <TEST_SERVER_API_KEY>: Test-environment server API key, created on the "API Key" page of the merchant portal

Note

Server API keys must only be used on your own server, so the docs site doesn't offer interactive API testing. Get a test key: API Key page in the merchant portal (opens the merchant portal in a new tab) (Test environment; Requires Owner, Admin or Developer)

Responses

The settlement list.

Settlement list
{
  "data": [
    {
      "id": "stl_demo_001",
      "currency": "USD",
      "period_start": "2026-09-23",
      "period_end": "2026-09-23",
      "status": "paid",
      "reserved_amount": 96500,
      "fee_amount": 500,
      "payout_amount": 96000,
      "payout_account": {
        "holder_name": "Demo Merchant Ltd",
        "bank_name": "Example Bank",
        "account_last4": "6789"
      },
      "payout_id": "po_demo_001",
      "created_at": "2026-09-24T01:00:00Z"
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "request_id": "req_demo_032"
}

Response fields

Paginated list: data is an array of objects. When has_more is true, use next_cursor to fetch the next page. See the object section for field descriptions.

NameTypeRequiredDescription
data
array<Settlement>Required
id
stringRequired

Settlement ID.

Example: stl_demo_001

currency
stringRequired

Settlement currency.

Constraints: Format ^[A-Z]{3}$

Example: USD

period_start
string(date)Required

The business date on which the settlement period starts (inclusive), in the merchant's settlement business time zone.

Example: 2026-09-21

period_end
string(date)Required

The business date on which the settlement period ends (inclusive).

Example: 2026-09-21

status
stringRequired

Settlement status.

  • pending_review: generated by the system and pending review; the selected merchant balance has been reserved atomically
  • approved: approved and pending execution
  • rejected: rejected in review; the reserved funds are released
  • paying: handed over for execution, or the payout outcome isn't determined yet; the funds stay reserved
  • paid: payout confirmed as successful after review
  • failed: the payout clearly didn't succeed this time; the reserved funds are released
  • canceled: not sent out yet and canceled by an authorized user; the reserved funds are released
  • returned: the bank returned the payout after it had succeeded
  • pending_review: Generated by the system and pending review; the selected merchant balance has been reserved atomically
  • approved: Approved and pending execution
  • rejected: Rejected in review; the reserved funds are released
  • paying: Handed over for execution, or the payout outcome isn't determined yet; the funds stay reserved
  • paid: Payout confirmed as successful after review
  • failed: The payout clearly didn't succeed this time; the reserved funds are released
  • canceled: Not sent out yet and canceled by an authorized user; the reserved funds are released
  • returned: The bank returned the payout after it had succeeded
  • More values may be added in the future. Don't treat a status you don't recognize as success.

Example: paid

reserved_amount
integer(int64)Required

S, the balance this settlement reserves by moving it from available to payout_pending.

Constraints: ≥ 0

Example: 8650

fee_amount
integer(int64)Required

Settlement fee F. The default is 0.

Constraints: ≥ 0

Example: 0

payout_amount
integer(int64)Required

Actual bank payout amount = S - F.

Constraints: ≥ 0

Example: 8650

payout_account
PayoutAccountRequired

A masked snapshot of the payout account, taken when the settlement was generated.

payout_id
stringNullableRequired

The corresponding payout record; null until it has been executed.

Example: po_demo_001

created_at
string(date-time)Required

The time the settlement was generated.

Example: 2026-09-22T02:00:00Z

has_more
booleanRequired

Whether there is a next page.

Example: false

next_cursor
stringNullableRequired

The cursor for the next page; null when there is no next page.

Example: null

request_id
stringRequired

Unique identifier of this request.

Example: req_demo_006

Possible error codes

HTTPError codeWhen it occursHow to handle
400invalid_requestIdempotency-Key is missing; the order ID contains invalid characters; payment_method_data and payment_method_id are submitted together; confirm=false carries card details; confirm=true has no return_url; a checkout session request sends both groups of identity parameters, or neither; a browser_info / billing_details field the provider requires is missing; the cursor, time format or limit is invalidFix the request according to error.field and resubmit it; don't charge again automatically
401unauthenticatedCommonNo Authorization header was sent; the key was copied incompletely; the old key expired after a rotation; the key was revokedCheck your credentials: on the API Key page in the merchant portal, verify the key's status and environment
403forbiddenCommonCreating a refund with a read-only key; calling getEvent without the read scope for the event's business area; if the request's source IP isn't on the key's allowlist, the more specific ip_not_allowed is returnedUse a key that has the required scope; don't work around the restriction
429rate_limitedCommonA rate limit per merchant and per key; switching keys doesn't get around the merchant's overall limitWait for Retry-After seconds, then retry with the original idempotency key
500internal_errorCommon—Retry with the original idempotency key, or query by merchant order ID / refund ID; never charge again with a new key
502 / 503upstream_unavailableCommonA provider or platform dependency failed, and the platform can't confirm whether this request took effectSame as above

Notes

  • The platform generates settlements according to the configured rules. The initial release has no self-service withdrawal API.
  • payout_amount = reserved_amount - fee_amount. payout_account is a masked snapshot taken when the settlement is generated.
Was this page helpful?