Before you start: the OMS API is in early access. Every endpoint, including the ones in this guide, requires an early-access API key. Request access before you begin. Cash pickup is enabled per project; contact us before you build against it.Authenticate by exchanging your API key and secret for a bearer token at
POST /auth/token, then send it as Authorization: Bearer {accessToken} on every request. Every POST request also requires an Idempotency-Key header. See Get started for the full flow.cash destination. To go the other way, from cash into a wallet, see Cash-in.
Prerequisites
- A customer (
cst_) that has completed onboarding for your project, with USDC in an OMS wallet (wlt_). - A webhook endpoint subscribed to
transaction.statusChanged. See Receive webhooks.
Step 1: Find a pickup location
CallGET /cash-locations with flow=cash_out, the search coordinates, the cash network identifier your project was enabled with in provider, and the customerId. With customerId, OMS returns only locations the customer is eligible to use.
sellAllowed is true. Keep the chosen location’s id (loc_) and cashLocationReference for the quote.
Step 2: Create a quote
Set the source to the customer’s OMS wallet and the destination tocash. The cash amount goes in the destination details: a multiple of 20.00, at most 400.00.
open, with sourceToDestination: cryptoToCash. Show the customer pricing.source.amount (the USDC that leaves the wallet), pricing.destination.amount (the cash), and pricing.fees, then get their confirmation before expiresAt. Quotes last 30 seconds by default.
Common rejections:
Step 3: Execute the transaction
processing.
Step 4: Give the customer the pickup code
When the cash is ready, OMS sendstransaction.statusChanged with subStatus processing.cashPickupReady. The code is on the destination:
destination.pickupCode, the location name and address, and the cash amount. Treat the code like cash: anyone holding it can collect.
Step 5: Track collection
The transaction endscompleted with one of two sub-statuses:
If the payout cannot be arranged, the transaction moves to
failed with a failure object that says why. Branch on status first and use subStatus for the detail; treat any sub-status you do not recognize by its prefix.
Key points
- Look up a location with
flow=cash_out. Use itsidandcashLocationReferenceascashLocationIdandcashLocationReferenceon the quote. - Set the amount on the cash side. Multiples of
20.00, up to400.00per transaction. - The pickup code is
destination.pickupCode. It appears withprocessing.cashPickupReady. - Collection and expiry are both
completed. ReadsubStatusto tell them apart.