API Reference

Check Status

This api will provide the information of a specific withdrawal

Through this API, a information of a specific withdrawal can be found. After calling the New Withdrawal API, a withdrawalID id is returned. Using this withdrawalID Check Status API can be called anytime.

📘

Endpoint

https://vivaropay.live/api/v1.0.0-beta/withdrawal/getStatus/{withdrawalID}

{withdrawalID} is the id which will provided by the merchant during request or gateway after successful withdrawal request

Request Headers

Include the following request headers:

ParameterValueRequired
AuthorizationToken found from the Get Token ApiYES
Content-Typeapplication/jsonYES
Acceptapplication/jsonNO

Response Parameters

ParameterTypeDescription
statusBooleanRequest status (True or False)
statusMessageStringMessage related to request
dataArrayWithdrawal data

Example Code

<?php

$curl = curl_init();

$withdrawalID = "WD-6691";

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://vivaropay.live/api/v1.0.0-beta/withdrawal/getStatus/'.$withdrawalID,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer Your Token'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Simple Response

{
    "status": true,
    "statusMessage": "Withdrawal data found",
    "data": {
        "merchant": "XYZ Limited",
        "method": "bkash",
        "wallet": "018********",
        "withdrawalID": "WD-6693",
      	"merWithdrawalID": "87DSDSDS",
        "amount": "500",
        "charge": "10",
        "metaData": null,
        "comment": "Withdrawal Done. TRXID: 0544SADSS7",
        "requestedAt": "2024-02-02 12:57:20",
        "processedAt": "2024-02-02 12:57:20",
        "webhook_url": null,
        "status": "success"
    }
}

Error Response

{
    "status": false,
    "statusMessage": "No withdrawal data found"
}