How to Integrate Casino Games API — Step by Step PHP Guide

Complete PHP integration guide for AchaGaming API. Learn how to launch games, handle callbacks, and manage player balances.

How to Integrate Casino Games API with PHP

This guide walks you through integrating AchaGaming API into your PHP-based casino platform.

Step 1: Game Launch API

```php <?php $apiUrl = "https://your-project.supabase.co/functions/v1/game-api"; $data = [ "action" => "game_launch", "api_key" => "YOUR_API_KEY", "member_id" => "player123", "game_uid" => "JILI_Fortune-Gems", "language" => "en" ];

$ch = curl_init($apiUrl); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); curl_setopt($ch, CURLOPT_HTTPHEADER, ["Content-Type: application/json"]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = json_decode(curl_exec($ch), true);

if ($response["code"] === 0) { $gameUrl = $response["data"]["game_url"]; header("Location: $gameUrl"); } ```

Step 2: Callback Handler

Set up a callback URL in your operator settings to receive bet/win notifications:

```php <?php $input = json_decode(file_get_contents("php://input"), true); $action = $input["action"]; $memberAccount = $input["member_account"]; $betAmount = $input["bet_amount"] ?? 0; $winAmount = $input["win_amount"] ?? 0;

// Process the transaction if ($action === "bet") { deductPlayerBalance($memberAccount, $betAmount); } elseif ($action === "win") { addPlayerBalance($memberAccount, $winAmount); }

echo json_encode(["code" => 0, "balance" => getPlayerBalance($memberAccount)]); ```

Step 3: Balance Check

AchaGaming API checks your operator balance before launching games. Maintain minimum ₹100 balance.

## Need Help? Contact our support team on Telegram for 24/7 integration assistance.

AchaGaming pricing explained

AchaGaming is a paid B2B service. The full API package costs **$350 USD as a one-time payment**. This package payment is separate from the ongoing revenue share of **10% of positive GGR**. GGR means settled real-money bets minus settled real-money wins for the settlement period.

For an illustrative example, if settled bets are $10,000 and settled wins are $8,000, positive GGR is $2,000. The 10% AchaGaming revenue share would therefore be $200. This is a calculation example, not a revenue forecast. Hosting, licensing, payment processing, marketing, taxes and jurisdiction-specific compliance are separate operator responsibilities.

The live catalogue currently contains **141 active providers**. Catalogue availability can change as studios or markets are added, paused or updated.

All articles · Casino API · Contact sales