Assets
An asset is one currency on one network enabled on your merchant account - say USDT on Tron, or ETH on Ethereum. Assets are what invoices are paid into, what balances are held in, and what withdrawals are sent from. Everything else in this API refers to them by assetId.
This page documents the HTTP endpoints you'll call from your backend. Authentication and the error-envelope format follow the public API style.
Base URL:
https://api.omypayments.comVersion:v1(all endpoints below start with/1.0/...) Auth: add your API key in the header:apiKey: <yourApiKey>Permission: the API key must have the invoice permission enabled, otherwise requests are rejected with403 Forbidden.
What you get from an asset
assetId- the identifier every other endpoint expects: creating invoices, requesting withdrawals, filtering transactions.crypto.decimals- how many decimals the token has. You need it for every amount you send us or read from us, because all amounts travel as integer strings in minimal units.Balances - what is available to spend, what is still awaiting confirmations, and what is held.
The default withdrawal wallet, if one is set for the asset.
Prerequisites
Assets are enabled in the merchant dashboard, not through the API. This section is read-only.
Only active assets are returned. An asset switched off in the dashboard disappears from these responses, and invoices can no longer be created for it.
Typical flow
assetsonce at integration time - cache theassetIdanddecimalsvalues you need.assetwhenever you need a fresh balance for one asset.
Balances change as payments arrive and withdrawals leave, so don't cache them. Identifiers and decimals are stable and safe to cache.
A word on amounts
Every amount in this API - invoice totals, withdrawal amounts, balances, fees - is an integer string in the token's minimal units, never a decimal number. For a token with 6 decimals, "100000000" means 100 tokens. Divide by 10^decimals for display, and never parse these values as floats: at 18 decimals a float silently loses precision.
Last updated