This api will provide the current balance of a merchant
Through this API, a current balance of a merchant can be found.
Endpoint
Request Headers
Include the following request headers:
Parameter | Value | Required |
---|---|---|
Content-Type | application/json | YES |
Accept | application/json | NO |
Request Parameters
Include the following request parameters:
Parameter | Type | Required | Description |
---|---|---|---|
client_key | String | YES | Client Key – Provided by VivaroPay after registration |
secret_key | String | YES | Secret Key – Provided by VivaroPay after registration |
Response Parameters
Parameter | Type | Description |
---|---|---|
status | Boolean | Request status (True or False) |
statusMessage | String | Message related to request |
merchant | String | Merchant's business name |
balance | Float | Merchant's account balance |
Example Code
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://vivaropay.live/api/v1.0.0-beta/balance/getBalance',
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_POSTFIELDS =>'{
"client_key": "Your Client Key",
"secret_key": "Your Secret Key"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Simple Response
{
"status": true,
"statusMessage": "Request data found",
"merchant": "XYZ Limited",
"balance": "5980.00"
}