API Reference

Check Account Balance

This api will provide the current balance of a merchant

Through this API, a current balance of a merchant can be found.

📘

Endpoint

https://vivaropay.live/api/v1.0.0-beta/balance/getBalance

Request Headers

Include the following request headers:

ParameterValueRequired
Content-Typeapplication/jsonYES
Acceptapplication/jsonNO

Request Parameters

Include the following request parameters:

ParameterTypeRequiredDescription
client_keyStringYESClient Key – Provided by VivaroPay after registration
secret_keyStringYESSecret Key – Provided by VivaroPay after registration

Response Parameters

ParameterTypeDescription
statusBooleanRequest status (True or False)
statusMessageStringMessage related to request
merchantStringMerchant's business name
balanceFloatMerchant'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"
}