Developer Friendly API

Zero Restriction
Global Integration

At FastPay 24, we believe in an open digital economy. We do not restrict or block any type of website. No matter your content or business model, our gateway is ready to automate your revenue.

bolt Ultra Fast

Confirmation hits your server in less than 2 seconds after payment.

verified_user 100% Auto

Blockchain & MFS monitoring is fully automated. No manual checking required.

public No Borders

Accept global crypto or local BDT from any legitimate source worldwide.

01

Database Table Setup

Run this SQL command in your phpMyAdmin SQL tab to create a secure payments tracking table.

CREATE TABLE `payments` (
  `id` int(11) PRIMARY KEY AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `order_id` varchar(100) UNIQUE,
  `amount` decimal(10,2),
  `status` enum('pending', 'paid') DEFAULT 'pending',
  `txn_id` varchar(255) DEFAULT NULL,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP
);
02

Database Configuration

Create a file named db_config.php and update it with your server credentials.

<?php
// db_config.php - Local Database Connection
$host = "localhost";
$db   = "your_database_name";
$user = "your_database_username";
$pass = "your_database_password";

$conn = new mysqli($host, $user, $pass, $db);
if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); }
?>
03

Payment Initiation

Request a secure payment session from our API. Update YOUR_API_KEY with your brand key.

<?php
include('db_config.php');

if(isset($_POST['pay_now'])) {
    $amount   = $_POST['amount'];
    $order_id = "ORD-" . time();
    
    $api_key  = "YOUR_API_KEY";
    $api_url  = "https://fastpay24.xyz/paymentapi";

    $post_data = [
        'api_key'      => $api_key,
        'amount'       => $amount,
        'order_id'     => $order_id,
        'callback_url' => "https://yourdomain.com/callback.php",
        'redirect_url' => "https://yourdomain.com/success.php?id=" . $order_id
    ];

    $ch = curl_init($api_url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_data));
    curl_setopt($ch, CURLOPT_REFERER, "https://yourdomain.com");

    $res = json_decode(curl_exec($ch), true);
    if($res['status'] == 'success') {
        $conn->query("INSERT INTO payments (user_id, order_id, amount) VALUES ('1', '$order_id', '$amount')");
        header("Location: " . $res['payment_url']);
    } else { echo "Error: " . $res['message']; }
}
?>
04

Webhook Success Listener

Our server will ping this callback.php file as soon as the payment is confirmed.

<?php
include('db_config.php');
// Anti-Duplicate Protection Ready
$json = file_get_contents('php://input');
$data = json_decode($json, true);

if ($data && $data['status'] == 'paid') {
    $order_id = $data['order_id'];
    $txn_id   = $data['txn_id'];

    $check = $conn->query("SELECT status FROM payments WHERE order_id = '$order_id'");
    $order = $check->fetch_assoc();

    if ($order && $order['status'] !== 'paid') {
        $conn->query("UPDATE payments SET status='paid', txn_id='$txn_id' WHERE order_id='$order_id'");
        // Deliver product/service here...
        http_response_code(200);
        echo "SUCCESS";
    }
}
?>

Need an expert to handle this?

If you face any issues during integration, our technical support team is ready to assist you. You can also hire our expert developers to integrate the gateway for you.