Check Credit Balance
This allow you check currently user balance.
POST
https://demo.connect.easyparcel.my/?ac=EPCheckCreditBalance Body: application/x-www-form-urlencoded · action EPCheckCreditBalance
Request parameters
Request L1
| Parameter | Type | Required | Description |
|---|---|---|---|
api | string(25) | Yes | Obtain from registered account. |
Sample code
php
<?php
$domain = "https://demo.connect.easyparcel.my/?ac=";
$action = "EPCheckCreditBalance";
$postparam = array(
'api' => 'xxxxxx',
);
$url = $domain.$action;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postparam));
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
ob_start();
$return = curl_exec($ch);
ob_end_clean();
curl_close($ch);
$json = json_decode($return);
echo "<pre>"; print_r($json); echo "</pre>";
?>bash
curl -X POST 'https://demo.connect.easyparcel.my/?ac=EPCheckCreditBalance' \
--data-urlencode 'api=xxxxxx'Response
Response L1
| Field | Type | Description | Remarks |
|---|---|---|---|
result | double(8,2) | Account Balance | |
api_ | string(10) | API execute status | (Refer to Appendix I) |
error_ | int(5) | API error code | (Refer to Appendix I) |
error_ | string(100) | API error remarks | (Refer to Appendix I) |
Response samples
json
{
"result":"99999755.99",
"api_status":"Success",
"error_code":"0",
"error_remark":""
}json
{
"api_status":"Error",
"error_code":"3",
"error_remark":"Required api key"
}