Skip to main content
A Payment is one bounded movement of value into or out of an account, with a fixed amount, an expiry and a final result. It keeps one payment_ id from creation to the last webhook, and there is no separate transfer, payout or conversion resource.

When to use it

intent never changes after creation. For open-ended top-ups by a returning customer, issue a deposit address instead: a payment is one amount, one expiry and one reference.

The object

Create, get, confirm and cancel return the payment inside an envelope: { payment, checkout, nextAction }.
  • checkout carries paymentUrl, clientSecret, expiresAt and returnUrl. It appears only on the response that creates a receive payment, and clientSecret is never returned again.
  • nextAction is the step owed now. type is transaction, managed_authorization or payment_method with an id and expiresAt, or one of start_kyc_session, verify_account_email, complete_compliance (with url and expiresAt), wait_for_partner_kyc, contact_support or none. It is null when nothing is owed, and always once the payment is terminal.
GET /v2/payments returns the bare resources, without checkout or nextAction.

Amount and amount mode

paymentAmount takes exactly one of amount (a decimal string) or amountAtomic (an integer string, with decimals), plus assetCode. assetType defaults to crypto. The body is validated strictly: an unknown key is rejected. expiresInSeconds sets the funding window, from 60 to 86400, with a default of 600. mandateId is accepted only on sends to the three crypto destinations.

Recipient on a receive

settlement.settlementDestinationId overrides the destination for this one payment and is accepted only when the recipient is an account. A recipient account needs an active settlement destination, or the create is refused. See Settlement destinations.

Destination types

A send names a destination. Stableyard resolves it and freezes the resolved shape at creation.
  • Account numbers are write-only. The resolved destination carries the last four digits only.
  • upa and payment_handle take the recipient’s asset. The recipient’s settlement profile decides the chain and asset.
  • A qualified handle can belong to another partner. On a send, name@namespace resolves across namespaces; see Wallets and handles.
  • Fiat destinations are enabled per market and per app. Read GET /v2/partners/config before offering one. A personal QR code is refused with bad_request and details.reasonCode: "personal_qr_not_supported".
The flows for each are on Sending payments, Stablecoin transfers and Off-ramps.

Frozen at creation

A later change to the account’s settlement profile, its display profile or your fee rates never rewrites an existing payment. Fee arithmetic is on Assessing fees, and quote deadlines on Conversion.

Payment options on a receive

A payer funds a receive payment through one option, created by the checkout with the payment’s checkout.clientSecret at POST /v2/public/payments/{paymentId}/options. Selecting an option never changes the obligation, the recipient, the settlement snapshot or the fees. The full option and the checkout calls are on Depositing funds.

States

accepted means verified funds with settlement not finished; succeeded means the destination was credited. A status never regresses after accepted: a later settlement, fee payout or refund problem moves operationalState instead, so a payment can be succeeded and requires_intervention at once.
Meanings and every operationalReasonCode are on Status codes. What to store is on Reconciliation.

Create and read

Only the receiving participant can cancel, and only before funds are detected. A send cannot be cancelled.

Refunds

A Refund returns verified funds from a receive payment and is tracked as its own record. Stableyard derives the destination from the verified payer evidence, on the escrow’s chain and token; you cannot choose or override it.
The body takes exactly one of amount or amountAtomic, a reasonCode of customer_request or operational, and a reason of 1 to 500 characters. A 202 returns the refund:
On the payment, refundSummary aggregates the refunds as status (none, pending, partially_refunded, refunded, failed, requires_intervention), count, requestedAmountAtomic and confirmedAmountAtomic.

Errors

Branch on error.code, and on details.code or details.reasonCode when the top-level code is conflict. The full list is on Errors.

Webhooks

payload.accountId is the sender on a send and the recipient on a receive. An event says something changed: read GET /v2/payments/{paymentId} for what is true. Meanings and signature verification are on Webhooks.

Depositing funds

Collect a receive payment through hosted or custom checkout.

Sending payments

Preview, create and confirm a send to any destination.

Reconciliation

Match payments to your records through duplicates and reordering.

Status codes

Every status and operational reason code.