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 }.
checkoutcarriespaymentUrl,clientSecret,expiresAtandreturnUrl. It appears only on the response that creates a receive payment, andclientSecretis never returned again.nextActionis the step owed now.typeistransaction,managed_authorizationorpayment_methodwith anidandexpiresAt, or one ofstart_kyc_session,verify_account_email,complete_compliance(withurlandexpiresAt),wait_for_partner_kyc,contact_supportornone. 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 adestination. Stableyard resolves it and freezes the resolved shape at creation.
- Account numbers are write-only. The resolved destination carries the last four digits only.
upaandpayment_handletake 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@namespaceresolves across namespaces; see Wallets and handles. - Fiat destinations are enabled per market and per app. Read
GET /v2/partners/configbefore offering one. A personal QR code is refused withbad_requestanddetails.reasonCode: "personal_qr_not_supported".
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’scheckout.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
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
ARefund 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.
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 onerror.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.
Related
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.