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:
Parameter | Value | Required |
---|---|---|
Authorization | Token found from the Get Token Api | YES |
Content-Type | application/json | YES |
Accept | application/json | NO |
Response Parameters
Parameter | Type | Description |
---|---|---|
status | Boolean | Request status (True or False) |
statusMessage | String | Message related to request |
data | Array | Withdrawal 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"
}