Swaps
Estimate and execute swaps between two of your merchant assets (a different token and/or network). This page documents the HTTP endpoints you’ll call from your backend. Authentication and the error-en
Status
Meaning
Last updated
Estimate and execute swaps between two of your merchant assets (a different token and/or network). This page documents the HTTP endpoints you’ll call from your backend. Authentication and the error-en
Base URL:
https://api.omypayments.comVersion:v2(all endpoints below start with/2.0/...) Auth: add your API key in the header:apiKey: <yourApiKey>Permission: the API key must have the swap permission enabled, otherwise requests are rejected with403 Forbidden.
Prerequisites
Both the source and target assets must be enabled in Assets (dashboard).
amount is expressed in the token’s base units (integer string, no decimal point). For USDT with 6 decimals, 100 USDT = "100000000" — see crypto.decimals on the “Get Merchant Asset Data” endpoint to convert.
An estimate is held for 30 minutes and is single-use: creating a swap consumes it.
Native coins (e.g. ETH, BNB) cannot be used as the target asset.
Rate limit: 50 requests/second.
Typical flow
swap/estimate → 2. swap/create (reserves funds, starts processing) → 3. swap/get and/or callbacks to track status.
Swap statuses
new
Swap created, funds reserved, awaiting processing.
in_progress
Swap is being executed on-chain / via the routing provider.
finished
Swap completed; amountTo, hashFrom, hashTo are populated.
rejected
Swap failed; reserved funds are returned to the available balance.
Last updated