Get Micro Deposit Data
Get micro deposits data for US virtual accounts.
Get Bank Details for onramp transaction.
GET http://api.onramp.money/onramp/api/v2/whiteLabel/bank/microDeposit
Request Params
Name
Type
Description
customerId*
String
Unique User Id received from /kyc/url
var CryptoJS = require('crypto-js');
var axios = require('axios');
async function getMicroDeposit({customerId,fiatType}) {
try {
let body = {
}
let payload = {
timestamp: new Date().getTime(),
body
}
const apiKey = ""; //Replace with your apiKey
const apiSecret = ""; //Replace with your apiSecret
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/whiteLabel/bank/microDeposit?customerId=${customerId}&fiatType=${fiatType}`,
method: 'GET',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json;charset=UTF-8',
'X-ONRAMP-SIGNATURE': signature,
'X-ONRAMP-APIKEY': apiKey,
'X-ONRAMP-PAYLOAD': payload
}
};
let data = await axios(options);
console.log(JSON.stringify(data?.data, null, 2));
return data?.data;
} catch (error) {
console.log(error?.response?.data || error?.response || error)
}
}
getMicroDeposit({customerId:sdbjsd_2,fiatType:21}); // dummy valuesstatus -> 0 is for unsuccessful request, 1 is for a successful one.
code: HTTP-like status code, here 200 indicates a successful response.
data -> An object containing micro deposit entries grouped by date (in YYYY-MM-DD format).
Last updated