GameFlow Developer API

Integrate powerful gaming commerce features into your game with just a few lines of code. Our RESTful API supports all major platforms and game engines.

99.9%

API Uptime

<200ms

Response Time

24/7

Support

Quick Start Guide

1

Get Your API Keys

Sign up for a GameFlow account and get your API keys from the dashboard.

// Your API credentials
const API_KEY = "gf_live_abc123...";
const PROJECT_ID = "proj_xyz789...";
2

Install SDK

Choose your platform and install the GameFlow SDK.

// Unity Package Manager
// Add package from git URL:
// https://github.com/gameflow/unity-sdk.git
3

Initialize & Test

Initialize the SDK and make your first API call.

// Initialize GameFlow
GameFlow.Initialize(API_KEY, PROJECT_ID);

// Test connection
GameFlow.TestConnection()
    .then(() => console.log("Connected!"))
    .catch(err => console.error(err));

API Reference

Payments API

Process payments, handle subscriptions, and manage virtual currency.

POST /api/v1/payments/purchase

Create Purchase

Create a new purchase transaction for virtual items or currency.

// Create a purchase
const purchase = await GameFlow.Purchase.create({
    items: [
        {
            id: "premium_sword",
            quantity: 1,
            price: 9.99,
            currency: "USD"
        }
    ],
    playerId: "player_123",
    metadata: {
        source: "in_game_store"
    }
});

console.log("Purchase ID:", purchase.id);
// Create a purchase (Unity C#)
var purchase = new PurchaseRequest
{
    Items = new List<PurchaseItem>
    {
        new PurchaseItem
        {
            Id = "premium_sword",
            Quantity = 1,
            Price = 9.99m,
            Currency = "USD"
        }
    },
    PlayerId = "player_123"
};

var result = await GameFlow.Purchase.CreateAsync(purchase);
curl -X POST https://api.gameflow.com/v1/payments/purchase \
  -H "Authorization: Bearer gf_live_abc123..." \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      {
        "id": "premium_sword",
        "quantity": 1,
        "price": 9.99,
        "currency": "USD"
      }
    ],
    "playerId": "player_123"
  }'
Parameters
items array Required Array of items to purchase
playerId string Required Unique player identifier
paymentMethod string Optional Preferred payment method
Response
{
  "id": "pur_abc123",
  "status": "completed",
  "amount": 9.99,
  "currency": "USD",
  "items": [
    {
      "id": "premium_sword",
      "name": "Legendary Sword",
      "quantity": 1
    }
  ],
  "createdAt": "2025-06-13T10:30:00Z"
}
GET /api/v1/payments/balance/{playerId}

Get Player Balance

Retrieve the current virtual currency balance for a player.

// Get player balance
const balance = await GameFlow.Player.getBalance("player_123");
console.log("Coins:", balance.coins);
console.log("Gems:", balance.gems);

In-Game Store API

Manage your in-game store, items, and inventory.

GET /api/v1/store/items

Get Store Items

Retrieve all available items in your game store.

// Get store items
const items = await GameFlow.Store.getItems({
    category: "weapons",
    limit: 20,
    offset: 0
});

items.forEach(item => {
    console.log(item.name, item.price);
});
Response
{
  "items": [
    {
      "id": "premium_sword",
      "name": "Legendary Sword",
      "description": "A powerful weapon for heroes",
      "price": 9.99,
      "currency": "USD",
      "category": "weapons",
      "rarity": "legendary",
      "image": "https://cdn.gameflow.com/items/sword.png"
    }
  ],
  "total": 1,
  "hasMore": false
}

Authentication API

Secure player authentication and session management.

POST /api/v1/auth/login

Player Login

Authenticate a player and create a session.

// Player login
const session = await GameFlow.Auth.login({
    email: "player@example.com",
    password: "securePassword123"
});

// Or social login
const socialSession = await GameFlow.Auth.loginWithGoogle({
    googleToken: "google_oauth_token"
});

console.log("Session token:", session.token);

Analytics API

Track events, player behavior, and revenue metrics.

POST /api/v1/analytics/events

Track Event

Send custom analytics events to track player behavior.

// Track custom events
await GameFlow.Analytics.track("level_completed", {
    level: 5,
    score: 2500,
    timeSpent: 180,
    playerId: "player_123"
});

// Track purchase events
await GameFlow.Analytics.trackPurchase({
    itemId: "premium_sword",
    amount: 9.99,
    currency: "USD",
    playerId: "player_123"
});

Integration Options

Unity

Unity SDK

Complete integration for Unity games with C# support.

🚀 Coming Soon 📋 Planned Features 📧 Get Notified
Join Waitlist
Unreal

Unreal Engine SDK

Native C++ and Blueprint support for Unreal Engine.

🚀 Coming Soon 📋 In Development 📧 Get Notified
Join Waitlist
JavaScript

Web SDK

JavaScript SDK for web games and browser integration.

🚀 Coming Soon 📋 TypeScript Support 📧 Get Notified
Join Waitlist
REST API

REST API

Direct HTTP API for custom integrations and any platform.

✅ Available Now ✅ Complete Documentation ✅ All Platforms
View Docs

API Testing Playground

Test our API endpoints directly from your browser.

Request Body

Response

Click "Send Request" to test the API

Developer Support

📚 Documentation

Comprehensive guides and API reference.

Browse Docs →

💬 Discord Community

Join our developer community for help and discussion.

Join Discord →

🎫 Support Tickets

Get direct help from our technical support team.

Create Ticket →

📧 Email Support

developers@sinartech.com

Send Email →