Prerequisites
- An API key (UUID) from the Mayan team β see Getting access.
- The base URL:
https://mps-api.mayan.finance.
x-api-key header.
1. Get a deposit address from a quote
Request a Mayan quote withmpsDeposit: true
and a destinationAddress (where the funds settle), then read mpsDepositAddress from an eligible
quote. Itβs a deterministic address on the quoteβs source chain β in the example below the payer
funds on Arbitrum and the merchant receives USDC on Base. The address is minted under your API key, so
MPS must be enabled for it.
mpsDepositAddress from any eligible quote (SWIFT, MONO_CHAIN, or a direct FAST_MCTP) β
they all share the same address. Quotes that arenβt eligible return mpsDepositAddress: null.
The address is deterministic and permanent for a given recipient +
mpsUserId β requesting another
quote returns the same address, so itβs safe to call on every checkout. Itβs null unless MPS is
enabled for your key, destinationAddress is set, and the amount clears the tokenβs
minimum.2. Let the user deposit
ShowmpsDepositAddress to your user and have them send the input token on the source chain
(Arbitrum, in the example above). MPS detects the deposit and settles it to your destination token
automatically β no signature, no transaction to build.
- A quote from an EVM source chain returns an EVM address (valid on that chain).
- A quote from Solana returns a Solana vault for SPL / Token-2022 deposits (USDC, USDT, WETH).
Whitelisted tokens β the native coin and USDC on EVM, and USDC / USDT / WETH on Solana
β are detected automatically. For any other token, trigger indexing yourself with
POST /request-index. See
Supported tokens.3. Receive the settlement
You have two ways to track a payment β use whichever fits your stack:- WebSocket (real-time)
- Polling
The stream is served over Socket.IO (See Events for the full payloads and reconnection/replay guidance.
bun add socket.io-client). Connect and receive
deposit_detected and status_changed events as they happen.status: "completed" (terminal: true, category: "success").
Most transfers settle in seconds. See Swap Statuses for the full lifecycle.
Full example: e-commerce checkout
Map your order ID to a stablempsUserId so the same order always maps to the same deposit address,
then watch for the terminal event.
status_changed β completed event to fulfil the order.
Deposits below the per-chain minimum USD value are detected but not settled. You still receive a
deposit_detected event with queued: false and ignoredReason: "below_min", so itβs never a
silent gap.Watch a payment end-to-end
Get an address from a quote (step 1), then subscribe to the event stream (Socket.IO) and wait until the settlement is terminal. This is the snippet most integrations start from β it prints each event and resolves oncompleted (success) or dead (gave up).