Create transaction
Creates an offramp transaction
This endpoint will create an offramp transaction and returns transactionId and deposit address
Create an Offramp transaction.
POST https://api.onramp.money/onramp/api/v2/whiteLabel/offramp/createTransaction
Request Body
fromCurrency*
String
Base currency of the trading pair E.g. of fromCurrency:
usdc | usdt | eth
toCurrency*
String
Quote currency of the trading pair
E.g. of toCurrency: INR | TRY | AED | MXN | IDR
chain*
String
supported networks by onramp for onchain transactions
E.g. of supported networks:
usdt - bep20 | matic20 | erc20 | trc20
usdc - bep20 | matic20
busd - bep20
eth - erc20 | matic20
fiatAccountId*
String
Unique ID of fiat account to withdraw off-ramped fiat to
customerId*
String
Unique id received from /kyc/url
fromAmount*
String
Actual Crypto quantity to be sold.
toAmount*
String
An estimate of fiat amount user will receive
rate*
String
expected price estimate
{
"status": 1,
"code": 200,
"data": {
"transactionId": "76440",
"createdAt": "2023-06-01T00:02:21.000Z",
"depositAddress": {
"address": "0xf18d064ec3ab7b9e900e4daa89798d29e8b4eab5",
"chain": "ETH"
},
"expiresAt": "2023-06-01T03:02:21.000Z"
}
}{
"status": 0,
"code": 400,
"error": "Missing parameter -> customerId, fromCurrency, toCurrency, fromAmount, toAmount, rate, fiatAccountId, chain."
}{
"status": 0,
"code": 500,
"error": "Unable to create Offramp transaction at the moment. Please try again after some time."
}status -> 0 is for unsuccessful request, 1 is for a successful one
transactionId -> unique identifier of the transaction
createdAt -> time at which the transaction was created.
depositAddress -> Deposit Address to send crypto to
chain -> denotes which chain the coin was sent on (e.g. MATIC20).
expiresAt -> denotes the order expiry time (if crypto is sent after this time, can only be resolved via ticket)
Last updated