Complete Developer & Publisher Documentation

Integrate Banner Ads, Pop-Ups, Link Shorteners, PTC Ads, Offerwalls, Database Tables, and Postbacks seamlessly onto your website.

1. Publisher Onboarding & Integration Steps
Follow these step-by-step instructions to register your site, embed ad widgets, configure database tracking, and receive automated revenue postbacks.
STEP 01
Sign In / Register

Log into your BitcoFast account to access publisher tools and retrieve your API keys.

STEP 02
Submit Target Website

Submit your domain URL in the Publisher Portal for automated network status verification.

STEP 03
Get API & Secret Keys

Copy your unique API_KEY and SECRET_KEY generated for your domain.

STEP 04
Embed Banner / Pop-Up Tag

Copy and paste the HTML iframe or JS widget code into your website template header or body.

STEP 05
Set Up Local DB Table

Run the MySQL table schema query below on your database to record user rewards.

STEP 06
Deploy Postback File

Upload bostback.php to your server to handle real-time signed user balance updates.

2. Auto-Responsive Banner Ads Integration
Display high-converting, auto-responsive banner ads on your website using this simple iframe tag. Replace YOUR_USER_ID with your actual BitcoFast account ID.
Banner Ad Embed Tag
<iframe src="https://bitcofast.com/ad_unit.php?pub=YOUR_USER_ID" marginwidth="0" marginheight="0" width="300" height="250" scrolling="no" border="0" frameborder="0"></iframe>
3. Pop-Up Traffic Monetization Script
Monetize pop-up traffic effortlessly. Paste this lightweight script tag directly into the <head> section of your website pages.
Pop-Up Header Script Tag
<script src="https://bitcofast.com/widget.js?pub=YOUR_USER_ID"></script>
4. Paid-To-Click (PTC) Ads API (`ptc_ads.php`)
Fetch dynamic PTC advertisement campaigns directly from BitcoFast and display them on your custom offerwall page.
ptc_ads.php
<?php
session_start();
$apiKey = "YOUR_API_KEY";
$userId =$_SESSION['user_id'] ?? 1;
$userIp = $_SERVER['HTTP_X_FORWARDED_FOR'] ?? $_SERVER['REMOTE_ADDR'] ?? '0.0.0.0';

$apiUrl = "https://bitcofast.com/api_ptc.php?" . http_build_query([
    'api_key' => $apiKey,
    'user_id' => $userId,
    'user_ip' => $userIp
]);

$response = @file_get_contents($apiUrl);
$result = json_decode($response, true);
$adsList =$result['data'] ?? [];
?>

<!-- Render Ads Grid on Your Site -->
<div class="ptc-grid">
    <?php foreach ($adsList as$ad): ?>
        <a href="<?= htmlspecialchars($ad['url']) ?>" target="_blank" class="ptc-card">
            <h4><?= htmlspecialchars($ad['title']) ?></h4>
            <span>+<?= $ad['user_reward'] ?> USDT</span>
        </a>
    <?php endforeach; ?>
</div>
5. Shortlinks Wall API (`shortlinks.php`)
Display available shortlink tasks on your website with automatic reward rate adjustments.
shortlinks.php
<?php
session_start();
$apiKey = "YOUR_API_KEY";
$userId =$_SESSION['user_id'] ?? 1;
$userIp = $_SERVER['HTTP_X_FORWARDED_FOR'] ?? $_SERVER['REMOTE_ADDR'] ?? '0.0.0.0';

$apiUrl = "https://bitcofast.com/api_shortlinks.php?" . http_build_query([
    'api_key' => $apiKey,
    'user_id' => $userId,
    'user_ip' => $userIp
]);

$response = @file_get_contents($apiUrl);
$result = json_decode($response, true);
$linksList =$result['data'] ?? [];
?>
6. CPA Offerwall API (`offerwalls.php`)
Connect your web platform users directly to high-paying CPA surveys and micro-task offers.
offerwalls.php
<?php
session_start();
$apiKey = "YOUR_API_KEY";
$userId =$_SESSION['user_id'] ?? 1;

$apiUrl = "https://bitcofast.com/api_offerwalls.php?" . http_build_query([
    'api_key' => $apiKey,
    'user_id' => $userId
]);

$response = @file_get_contents($apiUrl);
$result = json_decode($response, true);
$offersList =$result['data'] ?? [];
?>
7. Required Local Database Table (`earnings`)
Execute this SQL command in phpMyAdmin on your MySQL database server to build the target earnings history ledger:
MySQL Database Table Schema
CREATE TABLE IF NOT EXISTS earnings (
    id INT AUTO_INCREMENT PRIMARY KEY,
    user_id INT NOT NULL,
    source VARCHAR(50) DEFAULT 'BITCOFAST',
    amount DECIMAL(18,6) DEFAULT 0.000000,
    reference_id VARCHAR(100) UNIQUE NOT NULL,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    INDEX (user_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
8. Real-Time Postback Receiver Script (`bostback.php`)
Deploy this postback handler on your domain server to verify cryptographic signatures and automatically credit user balances.
bostback.php
<?php
// Save as bostback.php on your server
require 'db.php'; 

$SECRET_KEY = "YOUR_SECRET_KEY";

$userId     =$_GET['user_id']   ?? null;
$transId    =$_GET['trans_id']  ?? null;
$userReward  =$_GET['reward']    ?? null; 
$status     =$_GET['status']    ?? null;
$signature  =$_GET['signature'] ?? null;

if (!$userId \vert{}\vert{} !$transId || !$userReward \vert{}\vert{} !$signature) {
    http_response_code(400);
    exit('INVALID_REQUEST');
}

// Verify HMAC MD5 Hash Signature
$expectedSig = md5($userId .$transId . $userReward .$SECRET_KEY);
if ($expectedSig !==$signature) {
    http_response_code(403);
    exit('INVALID_SIGNATURE');
}

// Duplicate Transaction Check
$stmt =$db->prepare("SELECT id FROM earnings WHERE reference_id = ? LIMIT 1");
$stmt->execute([$transId]);
if ($stmt->fetch()) {
    exit('DUP');
}

$rewardAmount = (float)$userReward;
if ((int)$status === 2) {
    $rewardAmount = -abs($rewardAmount); // Chargeback handling
}

try {
    $db->beginTransaction();

    // Credit User Account Balance
    $stmt =$db->prepare("UPDATE users SET balance = balance + ? WHERE id = ?");
    $stmt->execute([$rewardAmount,$userId]);

    // Insert Earnings History Record
    $stmt =$db->prepare("INSERT INTO earnings (user_id, source, amount, reference_id) VALUES (?, 'BITCOFAST', ?, ?)");
    $stmt->execute([$userId, $rewardAmount,$transId]);

    $db->commit();
    echo 'ok';

} catch (Exception $e) {$db->rollBack();
    http_response_code(500);
    exit('SERVER_ERROR');
}
?>