API Documentation

1. Request to request.php

Endpoint:

POST https://flexiload.xyz/api/request.php

Parameters:

Parameter Type Description
api_user_id integer Your API user ID.
secret_key string Your secret key for authentication.
domain_url string your Domain URL (https://yourdomain.com)
sender_number string The number from which the recharge is initiated.
operator_name string The name of the operator (GP/Skitto/Robi/Airtel/Banglalink/Teletalk).
operator_number string The number of the operator
(017********/013**********
/018********/016********/)
014********/019********
015********
recharge_amount string The amount to be recharged.
total_charge string Total charge for the transaction.
recharge_details string Recharge Details (Normal / MB / Minute / Bundle)
Regular Recharge= Normal
MB Offer = MB
Minute Offer = Minute
Bundle Offer = Bundle
request_time string The time when the request is made.
recharge_status string Status of the recharge (Pending).
notify_status integer Notification status (0).

Success Response:

{
    "status": "success",
    "message": "Recharge request has been successfully processed."
}

Error Response:

{
    "status": "error",
    "message": "Invalid parameters provided."
}

Code Example: Sending a Request

curl -X POST -H "Content-Type: application/json" -d '{
    "api_user_id": Your API User Id Here,
    "secret_key": "Your Secret Key here",
    "domain_url": "Your Domain URL Here",
    "sender_number": "01829934805",
    "operator_name": "GP",
    "operator_number": "01701816269",
    "recharge_amount": "100",
    "total_charge": "105",
    "recharge_details": "Normal",
    "request_time": "2024-10-27 10:00:00",
    "recharge_status": "pending",
    "notify_status": 0
}' https://flexiload.xyz/api/request.php
📋
<?php
$url = 'https://flexiload.xyz/api/request.php';
$data = [
    "api_user_id": Your API User Id Here,
    "secret_key": "Your Secret Key here",
    "domain_url": "Your Domain URL Here",
    "sender_number" => "01829934805",
    "operator_name" => "GP",
    "operator_number" => "01701816269",
    "recharge_amount" => "100",
    "total_charge" => "105",
    "recharge_details" => "Normal",
    "request_time" => "2024-10-27 10:00:00",
    "recharge_status" => "Pending",
    "notify_status" => 0
];

$options = [
    'http' => [
        'header'  => "Content-Type: application/json\r\n",
        'method'  => 'POST',
        'content' => json_encode($data),
    ],
];

$context  = stream_context_create($options);
$result = file_get_contents($url, false, $context);

if ($result === FALSE) {
    // Handle error
}

echo $result;
?>
📋

2. Request to status.php

Endpoint:

POST https://flexiload.xyz/api/status.php

Parameters:

Parameter Type Description
api_user_id integer Your API user ID.
secret_key string Your secret key for authentication.
domain_url string Your website's URL.
operator_number string The number of the operator.
token string The token for the transaction.

Success Response:

{
    "status": "success",
    "message": "Transaction status retrieved successfully.",
    "data": {
        "recharge_status": "completed",
        "amount": "100",
        "operator": "Robi"
    }
}

Error Response:

{
    "status": "error",
    "message": "Transaction not found."
}

Code Example: Checking Status

curl -X POST -H "Content-Type: application/json" -d '{
    "api_user_id": Your API User Id Here,
    "secret_key": "Your Secret Key here",
    "domain_url": "Your Domain URL Here",
    "operator_number": "01829934805",
    "token": "unique_token_value"
}' https://flexiload.xyz/api/status.php
📋
<?php
$url = 'https://flexiload.xyz/api/status.php';
$data = [
    "api_user_id": Your API User Id Here,
    "secret_key": "Your Secret Key here",
    "domain_url": "Your Domain URL Here",
    "operator_number" => "01701716269",
    "token" => "unique_token_value"
];

$options = [
    'http' => [
        'header'  => "Content-Type: application/json\r\n",
        'method'  => 'POST',
        'content' => json_encode($data),
    ],
];

$context  = stream_context_create($options);
$result = file_get_contents($url, false, $context);

if ($result === FALSE) {
    // Handle error
}

echo $result;
?>
📋

3. Request For Balance Check request2.php

Endpoint:

POST https://flexiload.xyz/api/reqeust2.php

Parameters:

Parameter Type Description
api_user_id string Your API user ID.
secret_key string Your secret key for authentication.

Success Response:

{
            "status": "success",
            "balance": 100.0
        }

Error Response:

{
            "status": "error",
            "message": "Invalid credentials"
        }

Code Example: Sending a Request

curl -X POST -H "Content-Type: application/json" -d '{
            "api_user_id": "yourApiUserId",
            "secret_key": "yourSecretKey"
        }' https://flexiload.xyz/api/reqeust2.php
📋
<?php
        $url = 'https://flexiload.xyz/api/reqeust2.php';
        $data = [
            "api_user_id" => "yourApiUserId",
            "secret_key" => "yourSecretKey",
        ];
        
        $options = [
            'http' => [
                'header'  => "Content-Type: application/json\r\n",
                'method'  => 'POST',
                'content' => json_encode($data), // Corrected encoding
            ],
        ];
        
        $context  = stream_context_create($options);
        $result = file_get_contents($url, false, $context);
        
        if ($result === FALSE) {
            // Handle error
        }
        
        echo $result;
        ?>
📋