1. List the account’s destinations
status is active and capabilities.settlementSupported is true, and take its id.
2. Set the settlement profile
assetSymbol is optional.
status rather than assuming it: a newly created account’s profile is returned as draft, and the enum is draft, active, inactive, failed. Repeating the same selection returns the existing profile, and GET /v2/accounts/{accountId}/settlement-profile returns null when nothing is selected.
3. Collect a payment into the account
Create a receive payment addressed to the account. The destination is not in this request, and never is.merchantNetAmountAtomic is what the destination receives. Fees are deducted from the verified amount, not recalculated at settlement time.
4. Confirm the value landed
Subscribe to
payment.accepted and payment.succeeded rather than polling, and treat each event as a prompt to read the payment. payment.settlement_returned fires when a broadcast settlement comes back. See Webhooks.
The account now has a standing destination. Every later deposit into it settles there, net of fees, with no destination in any request body.
Next: Settlement lifecycle
When
accepted becomes succeeded, and what to read in between.