List settlements
/ settlementsReturn the environment's settlements as a list, {object, data, has_more, url}, newest first: the order a person reads a money-movement feed in.
The filters are named.
uda_id,deposit_tx_id,status,providerandscenariomatch exactly, andcreated[gte],created[gt],created[lte]andcreated[lt]boundcreated_at; together they are ANDed, and each page lists under the filters its own request sends, so a later page sends them again besidestarting_afterorending_before. Any other query parameter answers400parameter_unknownnaming it, and a value outside its schema, a badlimitor astarting_afterorending_beforenaming no object of this list answers422parameter_invalidnaming it.Finding the settlement of a deposit you know.
deposit_tx_idis the hash of the transaction that paid the deposit address, matched exactly, and it answers every settlement that deposit transaction raised (one transaction can carry several transfers). It is how a withdrawal that knows its deposit hash recovers the settlement that carried it. A mistyped name such asdeposit_txidanswers400parameter_unknownnaming it, never a wider list: a name the list does not declare is refused, never dropped.
Show 2 more detailsShow fewer details
The scope comes from the request, not from a filter.
The environment is resolved from the credential and the
X-Stridge-Environmentheader before any filter is read, and no filter can widen it: a settlement of another environment is on no page,uda_idnaming another environment's address included.A resetting sandbox.
While a sandbox's reset runs it answers
409environment_resetting: nothing is served for a sandbox until its reset finishes.
Parameters
Query
- limitinteger <int32>optionaldefault 20
The page size. A value that is not an integer from 1 to the maximum answers
422parameter_invalidnaminglimit; it is never clamped. - starting_afterstringoptional
A cursor: the id of an object of this list, usually the last one of the page just read. The page answered holds the objects that come right after it in the list's order. The object need not match this request's filters; its place in the order is what counts.
Show full descriptionShow less
An id that names no object of this list in this environment answers
422parameter_invalidnamingstarting_after. It cannot be sent withending_before. - ending_beforestringoptional
A cursor: the id of an object of this list, usually the first one of the page just read. The page answered holds the objects that come right before it, still in the list's order, and
has_moresays whether there are more before them.Show full descriptionShow less
An id that names no object of this list in this environment answers
422parameter_invalidnamingending_before, as does sending it together withstarting_after. - uda_idstring <uuid>optional
Only settlements raised from deposits to this deposit address.
- deposit_tx_idstringoptional
Only settlements of the deposit paid by this transaction: its hash on the source chain, as
deposit.tx_hashcarries it, matched exactly. - statusstringoptionalenum created · refill_pending · awaiting_credit · refill_confirmed · routing · completed · retrying · failed · refunded
Only settlements with this
status. - providerstringoptional
Only settlements this carrier routed, as
route.providernames it. - scenariostringoptionalenum same_chain_same_token · same_chain_diff_token · cross_chain_same_token · cross_chain_diff_token
Only settlements of this corridor, as
route.typenames it. It accepts every corridorroute.typenames, and gains a value wheneverroute.typedoes. - created[gte]string <date-time>optional
Only objects created at or after this instant (RFC 3339).
- created[gt]string <date-time>optional
Only objects created after this instant (RFC 3339).
- created[lte]string <date-time>optional
Only objects created at or before this instant (RFC 3339).
- created[lt]string <date-time>optional
Only objects created before this instant (RFC 3339).
Headers
- X-Stridge-Environmentstring <uuid>optional
Which environment the request acts inside, on an operation a session and an API key both call. Learn more
Show full descriptionShow less
It is required under a person's session, exactly as
EnvironmentHeaderdescribes: a session request that omits it answers400withenvironment required, and one naming an environment the caller holds no membership of answers404.An API key names its own environment, so a request made with one omits this header. A key request that sends it answers
400withenvironment header not accepted, whatever it names, rather than having the header ignored: a header that is silently ignored hides the integration bug that sent it.
Responses
The page of settlements.
- objectstringrequiredenum list
The object's type, always
list. - idstring <uuid>required
The settlement's opaque identifier.
- objectstringrequired
The object's type, always
settlement. - environment_idstring <uuid>required
The environment this settlement is scoped to. It is carried on the object rather than implied by the request, so the scope a client rendered is the scope the server answered in.
- livemodebooleanrequired
truewhenenvironment_idnames aliveenvironment andfalsein a sandbox. It is carried on the object itself, so a payload read on its own, a logged response or a webhook body, still says which side of the boundary it came from. - uda_idstring <uuid>required
The unified deposit address the money arrived at, and what the settlement was raised from.
- statusstringrequiredenum created · refill_pending · awaiting_credit · refill_confirmed · routing · completed · retrying · failed · refunded
Where the settlement stands. It is raised in
createdand moves throughrefill_pending,refill_confirmedandroutingtocompleted;retryingandfailedare reachable from routing, andrefundedis terminal besidecompleted.Show full descriptionShow less
awaiting_creditis where a settlement the workspace's gas credit cannot pay for parks: it is reached fromcreatedorrefill_pending, a top-up resumes it, and waiting to be paid for is not a failure, so it consumes no retry. A client reads this value and never sets it: there is no create and no refund on this family, andPOST /settlements/{id}/retryis the one move a client can ask for. One leg of a settlement: where the money sat, on which network, in which asset, and the transaction that moved it. Both legs carry this one shape, the inbound deposit and the outbound settlement alike, so a client renders either with the same component and reads the same keys from each.
Show full descriptionShow less
A leg still in flight is described rather than omitted.
completed_atis what says a leg has landed: it isnulluntil then, whileamountandtx_hashread what the carrier last reported, zero (amount: "0") and the empty string before it reported anything.One leg of a settlement: where the money sat, on which network, in which asset, and the transaction that moved it. Both legs carry this one shape, the inbound deposit and the outbound settlement alike, so a client renders either with the same component and reads the same keys from each.
Show full descriptionShow less
A leg still in flight is described rather than omitted.
completed_atis what says a leg has landed: it isnulluntil then, whileamountandtx_hashread what the carrier last reported, zero (amount: "0") and the empty string before it reported anything.What was taken between the two legs, and how it divides. Every figure is a
TokenAmountin the deposit leg's own asset and decimals, so the four always add up in one unit.How the money got from one leg to the other: the kind of move it was, who carried it, and how long it took.
- errorstring | nullrequired
Why the settlement failed, or
nullon every settlement that has not. It is developer documentation rather than user copy: a surface that renders a specific failure maps the status and this value onto its own message. Where a settlement stands on its retries, and whether a person may retry it by hand. It is carried on every settlement, retried or not, so a surface can say what a retry would do before anyone asks for one.
Show full descriptionShow less
Like any nested hash it has no identifier and no
objectof its own: it means nothing apart from the settlement that carries it.- created_atstring <date-time>required
When the settlement was raised. RFC3339 UTC,
Zsuffixed. - updated_atstring <date-time>required
When the settlement last moved. It equals
created_aton one that has not moved since it was raised.
- idstring <uuid>required
- has_morebooleanrequired
Whether the list holds more objects past this page in the direction it was read: after its last object, or before its first for a page read with
ending_before. - urlstringrequired
The path the list is read at.
Errors
The error.code values this operation can return. Each one links to its entry in the error catalogue, which explains the cause and the fix.
- 400environment_requiredEnvironment required
- 400header_invalidInvalid header
- 400422parameter_invalidInvalid parameter
- 400parameter_unknownUnknown parameter
- 401api_key_not_acceptedAPI key not accepted
- 401authentication_requiredAuthentication required
- 401publishable_key_not_acceptedPublishable key not accepted
- 401token_invalidInvalid or expired token
- 403membership_suspendedMembership suspended
- 403permission_deniedPermission denied
- 404environment_not_foundEnvironment not found
- 409environment_provisioningEnvironment provisioning
- 409environment_resettingEnvironment resetting
- 429rate_limitedToo many requests