Order status

Returns the order status of the transaction.

Returns the order status of the transaction

POST https://api.onramp.money/onramp/api/v2/common/transaction/orderStatus

Headers

Request Body

{
   "status":1,
   "code":200,
   "data":{
      "orderStatus":4
   }
}

Sample Request

var CryptoJS = require('crypto-js');
var axios = require('axios');
async function orderStatus() {
  try {
    let body = {
      orderId: '89912',
      type: 1         // 1 -> onramp, 2 -> offramp
    }
    let payload = {
      timestamp: new Date().getTime(),
      body
    }
    let apiKey = 'API_KEY', apiSecret = 'API_SECRET';
    payload = Buffer.from(JSON.stringify(payload)).toString('base64');
    let signature = CryptoJS.enc.Hex.stringify(CryptoJS.HmacSHA512(payload, apiSecret));
    let options = {
      url: 'https://api.onramp.money/onramp/api/v2/common/transaction/orderStatus',
      method: 'POST',
      headers: {
        'Accept': 'application/json',
        'Content-Type': 'application/json;charset=UTF-8',
        'X-ONRAMP-SIGNATURE': signature,
        'X-ONRAMP-APIKEY': apiKey,
        'X-ONRAMP-PAYLOAD': payload
      },
      data: body
    };
    let data = await axios(options)
    console.log(data?.data);
  } catch (error) {
    console.log(error?.response?.data)
  }
}
orderStatus();
{
   "status":1,
   "code":200,
   "data":{
      "orderStatus":4
   }
}

Last updated