Sub-Accounts Wallet
This endpoint helps get the balance a sub-account created under your account.
POST
https://api.oneappgo.com/v1/business/subaccount-wallet
Request Body
customer trancking id store during creation or from get subaccount endpoint
Take a look at how you might do this:
curl --location 'https://api.oneappgo.com/v1/business/subaccount-wallet' \
--header 'Authorization: Bearer SECRET_KEY' \
const axios = require('axios');
let config = {
method: 'post',
url: 'https://api.oneappgo.com/v1/business/subaccount-wallet',
headers: {
'Authorization': 'Bearer SECRET_KEY',
}
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.oneappgo.com/v1/business/subaccount-wallet',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer SECRET_KEY'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Sample Response
{
"status": true,
"msg": "Retrieved",
"balance": "260400.00",
"ledgerbal": "0.00",
"usdbal": "0.00",
"usdledgerbal": "0.00"
}