Skip to main content
POST
Create order

Authorizations

Authorization
string
header
required

API key sent in the Authorization header, with no Bearer prefix.

Path Parameters

organizationId
string<uuid>
required

The organization this call acts for: your API key's organization or one of its customer organizations. Any other id returns 404 not-found.

Body

application/json
quoteId
string<uuid>
required
memo
string

Your note for the order. Up to 255 characters; longer returns 400. A memo that contains <, >, ;, {, }, a backtick, |, \, $(, ../ or a control character also returns 400.

Maximum string length: 255

Response

An order already exists for this quote. Returns that order.

authorization
object | null
required

Set while the order waits for the account holder to approve a transfer we built: a funding authorization while the order is created, and a claim authorization while it is claimable. Otherwise null. Approve it with POST /organization/{organizationId}/order/{id}/authorization.

Example:
claimInstructions
stellarClaimableBalance · object | null
required

Set while the order is claimable. Otherwise null. Always null for an embedded wallet, whose claim is the order's authorization.

completedAt
string<date-time> | null
required
createdAt
string<date-time>
required
deliveryTransactionId
string | null
required

Hash of the on-chain transaction that delivered the funds to the destination wallet. When the customer has to claim the payout, we set it to their claim transaction. Null until the order is completed, and always null for a bank destination. It can also stay null on a completed order, such as one completed before we added this field.

destination
object
required
fees
object[]
required
fundingInstructions
object
required

How the source funds the order.

id
string<uuid>
required

The order id. Equal to the quoteId it was created from.

memo
string | null
required
organizationId
string<uuid>
required

The organization the order belongs to.

returnedDeposits
object[]
required

Deposits we sent back because they did not match the order, oldest first: a deposit from the order's source wallet for the wrong amount, or a bank transfer with this order's reference for the wrong amount. The order stays open and waits for a deposit that matches. We return at most one deposit from a wallet per order, and only a single transfer of the order's asset from the source wallet. A second wrong deposit, or a deposit with more than one transfer, sender or asset, is held for our team and not sent back automatically. We never send back a deposit from any other wallet. Empty when we returned nothing.

source
object
required
status
enum<string>
required

created: waiting for the source funds. funded: source funds received. sourcingLiquidity: source funds received, and the payout is waiting while we add funds to our payout account, usually by the next business day. It usually happens only for larger orders, and generally only for payouts to a bank account. The order stays in this status until it is completed or failed. claimable: delivered, waiting for the customer to claim; see claimInstructions. completed: delivered. failed: could not be completed; see failure. canceled: canceled before completion. refunded: the order ended and we sent its source funds back. A returned deposit in returnedDeposits does not end the order.

Available options:
created,
funded,
sourcingLiquidity,
claimable,
completed,
failed,
canceled,
refunded
updatedAt
string<date-time>
required
failure
object

Present only when status is failed.

midMarketRate
string

Destination asset units per source asset unit at quote time, before fees. Present when the quote recorded a mid-market rate. On a CETES to USDC swap, divide source.amountInFiat by source.amount * midMarketRate to get MXN per USDC.