List payouts
/ payoutsReturn the environment's outbound payments as a list, {object, data, has_more, url}, newest first.
The filters are named.
vault_id,reference_id,to_address,network_symbolandstatusmatch exactly,assetmatches the symbol in any case, 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. Anetwork_symbolno chain answers to matches nothing.One vault's payouts are
vault_id=…, and the vault is not mandatory.The vault is an attribute of a payout, so the money-out feed of the whole environment is one list, narrowed by vault when a caller asks.
Show 4 more detailsShow fewer details
A
reference_idfilter can answer more than one payout: a reference freed by a payout that moved no money stays on that payout, beside the payout made under it afterwards.The pending payouts are
status=requestedandstatus=queued.A payout in either of those two states is one a client may still reject; the other four are terminal.
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 payout of another environment is on no page, avault_idnaming another environment's vault 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. - vault_idstring <uuid>optional
Only payouts out of this vault.
- reference_idstringoptional
Only payouts carrying this
reference_id. - to_addressstringoptional
Only payouts to this address, as
to_addresscarries it. - network_symbolstringoptional
Only payouts on this chain, named by its slug.
- assetstringoptional
Only payouts of this asset, by its ticker.
- statusstringoptionalenum requested · queued · confirmed · rejected · expired · failed
Only payouts in this
status. - 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 payouts.
- objectstringrequiredenum list
The object's type, always
list. - idstring <uuid>required
The payout's own identifier.
- objectstringrequired
The object's type, always
payout. - environment_idstring <uuid>required
The environment whose money this payout moves. It is carried on the object rather than implied by the request, so a payout detached from the request it arrived on still says which world it left.
- 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. - vault_idstring <uuid>required
The vault the money leaves. It is the term a caller narrows this list by, and the vault must belong to the environment the request is scoped to.
- reference_idstringrequired
The caller's own identifier for this payment. While this payout holds it, a second create naming it answers
409payout_reference_takennaming this payout. Only a payout that certainly moved no money frees it, and a later payout in the vault may then carry the same reference. - to_addressstringrequired
Where the money goes, in the chain's own encoding.
- network_symbolstringrequired
The chain the payment is made on, as the chain's own slug.
- assetstringrequired
The ticker of the asset the vault pays in.
How much of the asset is being paid, as a
TokenAmountin the asset's own decimals onnetwork_symbol. A payout sized byamountcarries the figure the caller stated; one sized byusd_amountcarries what Stridge converted it to, rounded down to the asset's smallest unit.Show full descriptionShow less
A payout stored with a figure finer than that unit is stated rounded down to it, the quantity the chain was sent; one whose asset the network no longer lists is stated in its own asset, at the decimals of its stored figure. A routed payout's
amountis what the recipient receives, inroute.destination_assetat its decimals onroute.destination_network_symbol, the same figure asroute.destination_amount;route.source_amountis what the vault spends.- usd_amountstringrequired
What the payment is worth in USD, as a decimal string, or the empty string when no price could be read when the payout was created. A caller may state this INSTEAD of
amountand let Stridge convert, in which caseratesays what it converted at. - ratestring | nullrequired
The conversion Stridge used between the asset and USD, or
nullwhen it recorded none. It is an opaque passthrough: a client renders it and does not compute with it. - statusstringrequiredenum requested · queued · confirmed · rejected · expired · failed
Where the payout got to.
requestedandqueuedare the two states a client may still reject out of;confirmed,rejected,expiredandfailedare terminal, and rejecting one answers409.Show full descriptionShow less
rejectedis a first-class terminal state here. A cancelled payment left to lapse toexpiredwould lose the distinction between a payment nobody acted on and one somebody refused. This contract keeps them apart, and Stridge answers what the contract states. - tx_idstring | nullrequired
The on-chain transaction that carried the payment, or
nullbefore one exists. - remarkstring | nullrequired
A free-form note the caller attached, or
null. - errorstring | nullrequired
Why a
failedpayout failed, ornull. - expired_atstring | null <date-time>required
When the payment stops being attemptable: the window the caller stated at create, within 12 hours of now, or an hour after creation when it stated none. Every payout has one.
- created_atstring <date-time>required
When the payment was requested. RFC3339 UTC,
Zsuffixed. The list is ordered on it, newest first. - confirmed_atstring | null <date-time>required
When the payment was confirmed on chain, or
nulluntil it is. How a payout to another network or asset reaches its recipient, or
nullfor a payout on the vault's own network and asset.
- 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