# Neo API Transfer (Two Wallet) guide

# Overview

## What is Neo API?

Neo API is a super API that brings together the API lines of more than **80 game providers**, so you can connect every provider to your system through a single API.

## Integration

Neo API supports two integration types: See the API integration details

#### 1. Seamless (Single Wallet)

In Seamless, the game provider does not hold the player's money (or holds it only briefly). Every bet and win callbacks to you directly through the API. Every callback must be implemented transactionally and idempotently, to guard against double deductions.

Pros:

- Best UX: the player sees one central balance, with no transfers between systems
- Fewer stuck or lost funds

Cons:

- Your system must handle a very high call rate (high QPS) and respond quickly
- Errors need more complex handling (guarding against duplicates and replays)
- You are the source of truth — you need a solid audit log and replay protection

Suited to:

- Operators with a stable, robust system
- You want players to switch games or providers instantly without transferring
- With a complete idempotency key, ledger and audit implementation

#### 2. Transfer (Two Wallet)

In Transfer, the game provider creates one "provider-side wallet" per player. To play, money must be moved into that wallet first (transfer-in), and when the session ends or the player leaves the game it must be moved back (transfer-out). While the player is in a game the provider runs and settles it itself — there is no callback to you on every round as there is with seamless.

Pros:

- Your system only takes API load at transfer time — it does not have to handle per-bet calls while players are in a game
- The provider settles bets internally
- Easier to start with than seamless

Cons:

- UX may be worse — the player sees separate balances, or transfers are slow and can get stuck
- Money can get stuck if a session hangs or errors

Suited to:

- Teams new to building this kind of system
- Systems that do not want to take real-time gameplay API load

## Credit

Neo API uses a credit system to govern usage. Credit is counted from the win/loss total of the players connected under your account.

Careful:

when credit runs out players cannot play. Keep an eye on whether your account still has enough.

Contact your upline if you need more credit.

## Setting RTP

Neo API supports **30+ RTP-adjustable providers** where you can set the RTP (return to player) and control the payout rate as you like. You can set RTP across all providers or per provider from the UI, and set it precisely per player in real time through the API.

The API offers two ways: send the `rtp` field with `init-session` to set it for that session only, or call `set-rtp` to set it persistently for the whole provider so you don't have to send it on every launch (see section 5.2 of the API integration guide).

# Opening a downline

## Create a sub-agent

You can create sub-agent accounts, and your sub-agents can manage their own downline in turn. As the upline you can oversee every sub-agent beneath you.

### What to fill in when creating a sub-agent:

- **Username**: the sub-agent's username
- **Password**: the sub-agent's password
- **Callback Type**: choose the integration type (Seamless or Transfer)
- **Callback URL**: the URL that receives callbacks (for Seamless). You can leave it blank for now.
- **Credit**: the amount of credit to give the sub-agent
- **Provider Rates**: the commission rate for each provider

## See activity under your line

You can see all sub-agent activity on the dashboard to track statistics such as:

- **Sub-agent list**: see every sub-agent you have created
- **Remaining credit**: see each sub-agent's used and remaining credit
- **Transaction totals**: see each sub-agent's bet volume and win/loss
- **Statistics by period**: see usage statistics for a chosen date range
- **Hierarchy Level**: see the sub-agent's level in the hierarchy

You can click into each sub-agent to see more detail and manage them.

# API integration

## Transfer Integration

Transfer integration is a system with "users" and "balances", so customers and partners can create players, top up, withdraw, check balances and view transaction history.

**Important notes:**

- `username` must be unique per agent (no duplicates)
- `amount` / `initialBalance` are numbers and **must not be negative**
- Times in the system use ISO 8601, e.g. 2026-01-04T08:34:02.060Z

### Authentication

Every request between an agent and Neo API must carry the private key in the `Authorization` header for authentication

Go to the [My account](/settings) page to view and copy your private key

**Note:**

- The private key authenticates your requests to Neo API
- Keep your private key secret and never disclose it to anyone
- If your private key is exposed, reset it immediately for safety

Authentication Errors:

**Missing Authorization Header / Invalid Private Key**

```json
{
  "error": "UNAUTHORIZED",
  "message": "INVALID_PRIVATE_KEY"
}
```

### 1. Create User

Create a new player in the system, optionally with a starting balance

Request:

```json
POST /api/external-transfer/create-user
Content-Type: application/json
Authorization: YOUR_PRIVATE_KEY

{
  "username": "string",
  "initialBalance": 0
}
```

##### Request body:

- `username` (required): the player's name
- `initialBalance` (optional): starting balance (treated as 0 if omitted)

Response:

```json
{
  "id": "string",
  "username": "string",
  "agentId": "string",
  "balance": 0,
  "createdAt": "2026-01-04T08:34:02.060Z"
}
```

##### Example code:

```bash
curl -X POST https://api.neoapihub.com/api/external-transfer/create-user \
  -H "Authorization: YOUR_PRIVATE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "string",
    "initialBalance": 0
  }'
```

```bash
curl -X POST https://api.neoapihub.com/api/external-transfer/create-user \
  -H "Authorization: YOUR_PRIVATE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "string",
    "initialBalance": 0
  }'
```

### 2. Transfer In

Top up a player (increase the balance)

**Note:**

A player has 100 baht in the system. To add 50 more, send 50 — the system raises it from 100 to 150 baht.

Request:

```json
POST /api/external-transfer/transfer-in
Content-Type: application/json
Authorization: YOUR_PRIVATE_KEY

{
  "username": "string",
  "amount": 0
}
```

##### Request body:

- `username` (required): the player's name
- `amount` (required): the amount to top up (must be greater than 0)

Response:

```json
{
  "id": "string",
  "agentId": "string",
  "agentUserId": "string",
  "transferAmount": 0,
  "transferType": "IN",
  "balanceBefore": 0,
  "balanceAfter": 0,
  "createdAt": "2026-01-04T08:34:27.438Z"
}
```

##### Example code:

```bash
curl -X POST https://api.neoapihub.com/api/external-transfer/transfer-in \
  -H "Authorization: YOUR_PRIVATE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "string",
    "amount": 0
  }'
```

```bash
curl -X POST https://api.neoapihub.com/api/external-transfer/transfer-in \
  -H "Authorization: YOUR_PRIVATE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "string",
    "amount": 0
  }'
```

### 3. Transfer Out

Withdraw / move money out of a player (decrease the balance)

**Note:**

A player has 100 baht in the system. To move 50 out, send 50 — the system reduces it from 100 to 50 baht.

Request:

```json
POST /api/external-transfer/transfer-out
Content-Type: application/json
Authorization: YOUR_PRIVATE_KEY

{
  "username": "string",
  "amount": 0
}
```

##### Request body:

- `username` (required): the player's name
- `amount` (required): the amount to withdraw (must be greater than 0)

Response:

```json
{
  "id": "string",
  "agentId": "string",
  "agentUserId": "string",
  "transferAmount": 0,
  "transferType": "OUT",
  "balanceBefore": 0,
  "balanceAfter": 0,
  "createdAt": "2026-01-04T08:34:27.438Z"
}
```

##### Example code:

```bash
curl -X POST https://api.neoapihub.com/api/external-transfer/transfer-out \
  -H "Authorization: YOUR_PRIVATE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "string",
    "amount": 0
  }'
```

```bash
curl -X POST https://api.neoapihub.com/api/external-transfer/transfer-out \
  -H "Authorization: YOUR_PRIVATE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "string",
    "amount": 0
  }'
```

### 4. Get Balance

Fetch a player's current balance

Request:

```json
POST /api/external-transfer/get-balance
Content-Type: application/json
Authorization: YOUR_PRIVATE_KEY

{
  "username": "string"
}
```

Response:

```json
{
  "username": "string",
  "balance": 0
}
```

##### Example code:

```bash
curl -X POST https://api.neoapihub.com/api/external-transfer/get-balance \
  -H "Authorization: YOUR_PRIVATE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "string"
  }'
```

```bash
curl -X POST https://api.neoapihub.com/api/external-transfer/get-balance \
  -H "Authorization: YOUR_PRIVATE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "string"
  }'
```

### 5. Set Balance

Set a player's balance directly to a chosen value (instead of transfer-in/out) — useful for syncing balances with an external system

**Note:**

A player has 100 baht in the system. To set it to 150, send 150 — the system sets the player's balance to 150 baht.

Request:

```json
POST /api/external-transfer/set-balance
Content-Type: application/json
Authorization: YOUR_PRIVATE_KEY

{
  "username": "string",
  "amount": 0
}
```

##### Request body:

- `username` (required): the player's name
- `amount` (required): the "final" balance you want it to be

Response:

```json
{
  "id": "string",
  "agentId": "string",
  "agentUserId": "string",
  "transferAmount": 0,
  "transferType": "IN",
  "balanceBefore": 0,
  "balanceAfter": 0,
  "createdAt": "2026-01-04T08:34:27.438Z"
}
```

##### Example code:

```bash
curl -X POST https://api.neoapihub.com/api/external-transfer/set-balance \
  -H "Authorization: YOUR_PRIVATE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "string",
    "amount": 0
  }'
```

```bash
curl -X POST https://api.neoapihub.com/api/external-transfer/set-balance \
  -H "Authorization: YOUR_PRIVATE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "string",
    "amount": 0
  }'
```

### 6. Get Transfer History

Fetch a player's top-up / withdrawal / adjustment history, paginated

Request:

```json
POST /api/external-transfer/get-transfer-history
Content-Type: application/json
Authorization: YOUR_PRIVATE_KEY

{
  "username": "string",
  "startDate": "2026-01-04T08:36:37.138Z",
  "endDate": "2026-01-04T08:36:37.138Z",
  "page": 1,
  "limit": 20
}
```

##### Request body:

- `username` (required): the player's name
- `startDate` (required): start time (ISO 8601)
- `endDate` (required): end time (ISO 8601)
- `page` (required): pages start at 1
- `limit` (required): entries per page

Response:

```json
{
  "transactions": [
    {
      "id": "string",
      "agentId": "string",
      "agentUserId": "string",
      "transferAmount": 0,
      "transferType": "IN",
      "balanceBefore": 0,
      "balanceAfter": 0,
      "createdAt": "2026-01-04T08:36:37.138Z"
    }
  ],
  "total": 0,
  "page": 0,
  "limit": 0
}
```

##### Example code:

```bash
curl -X POST https://api.neoapihub.com/api/external-transfer/get-transfer-history \
  -H "Authorization: YOUR_PRIVATE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "string",
    "startDate": "2026-01-04T08:36:37.138Z",
    "endDate": "2026-01-04T08:36:37.138Z",
    "page": 1,
    "limit": 20
  }'
```

```bash
curl -X POST https://api.neoapihub.com/api/external-transfer/get-transfer-history \
  -H "Authorization: YOUR_PRIVATE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "string",
    "startDate": "2026-01-04T08:36:37.138Z",
    "endDate": "2026-01-04T08:36:37.138Z",
    "page": 1,
    "limit": 20
  }'
```

### 7. Fetching the game list

The endpoint an agent calls on Neo API to get all games, or the games of a given provider, so the `gameId` can then be used to create a session for a player

📢 Notice (Jul 2026): Plus providers have new providerId / gameId

- JILI_plus, SA_plus, NOLIMITCITY_plus, EVOPLAY_plus and FACHAI_plus have moved to a new system — **the provider names are unchanged, but providerId and gameId are all new** — along with a new provider, SEXY_plus
- Please call get-games to sync the new game list, then update the gameId / providerId stored in your system
- The old gameId set still launches games during the transition only, and will be switched off in the next step — we recommend syncing again now.

Request:

```json
POST /api/external/get-games
Content-Type: application/json
Authorization: YOUR_PRIVATE_KEY

{
  "agentId": "string",
  "providerList": ["string"] // optional
}
```

##### Request body:

- `agentId`: the agent's ID
- `providerList` : the provider IDs you want (optional — all of them if omitted)

Response:

```json
{
  "providers": [
    {
      "provider": {
        "id": "string",
        "name": "string",
        "isRedirect": true,
        "logoUrl": "string" // optional
      },
  "games": [
    {
          "id": "string",
          "name": "string",
          "code": "string",
          "imageUrl": "string",
          "type": "slot" | "casino" | "table" | "fishing" | "lottery" | "virtual" | "sports",
          "tag": "string", // optional
          "order": 0, // optional
          "isRecommend": true,
          "isNew": false,
          "providerId": "string",
          "mappedGameCode": "string" // optional
        }
      ]
    }
  ]
}
```

##### Example code:

```bash
curl -X POST https://api.neoapihub.com/api/external/get-games \
  -H "Authorization: YOUR_PRIVATE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agentId": "string",
    "providerList": ["string"]
  }'
```

### 8. Creating a Session

The endpoint an agent calls on Neo API to get a redirect URL that starts a game for a player

**Note:**

- If you run several sites, we suggest suffixing the username with the site name to avoid duplicates
- The private key must be attached in the Authorization header

Request:

```json
POST /api/external/init-session
Content-Type: application/json
Authorization: YOUR_PRIVATE_KEY

{
  "gameId": "string",
  "username": "string",
  "hrefBackUrl": "string",
  "agentId": "string",
  "language": "en" | "cn" | "jp" | "th" | "vn" | "kr",
  "isDesktop": true, // optional, default: true
  "rtp": number, // optional, 30-99 (default: 97)
  "clientIp": "string", // required for PG games
}
```

##### Request body:

- `gameId`: the ID of the game to play
- `username`: the username
- `hrefBackUrl` : the URL to return to when leaving the game
- `agentId`: the agent's ID
- `language`: the language you want (en, cn, jp, th, vn, kr). Default: th
- `isDesktop`: whether this is desktop (optional, default: true)
- `rtp`: the game's RTP (optional, 30-99, default: 97)
- `clientIp`: The player's IP address (required for PG games — without it init-session answers 400 and the game will not open; every other provider ignores this field)

Response:

```json
{
  "url": "string", // optional
  "html": "string", // optional
  "type": "url" | "html" | "redirect"
}
```

##### Response body:

- `url`: the URL to launch the game (optional, present when type = "url" or "redirect")
- `html`: HTML for launching the game (optional, present when type = "html")
- `type`: the response type ("url", "html" or "redirect")

##### Example code:

```bash
curl -X POST https://api.neoapihub.com/api/external/init-session \
  -H "Authorization: YOUR_PRIVATE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "gameId": "string",
    "username": "string",
    "hrefBackUrl": "string",
    "agentId": "string",
    "language": "th",
    "isDesktop": true,
    "rtp": 97,
    "clientIp": "203.0.113.42"
  }'
```

Handling the response:

- When you call `/api/external/init-session` , the response comes back and you must first look at `type` to see whether it is `url` or `html`
- If it is a **URL** (type = "url") or **REDIRECT** (type = "redirect"), use the `url` returned to open the game in a new tab (especially type = "redirect", e.g. HuayDragon, which does not support iframes — it must be a new tab and must never be embedded in an iframe)
- If it is **HTML** (type = "html"), your site must render the HTML from `html` to open the game for the player

### 9. Checking a sub-agent's credit

An endpoint for checking an upline's overall credit and, in one call, the credit of every sub-agent beneath it — useful for a dashboard or credit monitoring page

Request:

```json
POST /api/external/get-sub-agent-quota-summary
Content-Type: application/json
Authorization: YOUR_PRIVATE_KEY

{
  "agentId": "string"
}
```

##### Request body:

- `agentId` (required): the agent ID of the upline whose credit you want to check

Response:

```json
{
  "winningQuota": 100000,
  "winningQuotaUsed": 25000,
  "subagents": [
    {
      "username": "subagent01",
      "winningQuota": 30000,
      "winningQuotaUsed": 5000
    }
  ]
}
```

##### Response:

- `winningQuota` : the upline's total credit
- `winningQuotaUsed` : the credit the upline has already used
- `subagents`: the credit of the sub-agents under this line

### 10. Player lottery bet history

An endpoint for pulling one player's lottery bet history, with pagination and status filtering, to build a history page for the player

Request:

```json
POST /api/external/get-poy-group-history-by-user
Content-Type: application/json
Authorization: YOUR_PRIVATE_KEY

{
  "agentId": "string",
  "userId": "string",
  "poyGroupStatusList": ["WIN", "LOSE"], // optional
  "skip": 0, // optional (default: 0)
  "take": 10 // optional (default: 10)
}
```

##### Request body:

- `agentId` (required): the agent ID of the line that owns the player
- `userId` (required): the player's username on the agent side
- `poyGroupStatusList` (optional): filter by status, e.g. WIN, LOSE, SETTLED, PENDING, FAILED, CANCELLED, REFUND
- `skip` (optional): how many entries to skip
- `take` (optional): entries per page

##### What the statuses mean (PoyGroupStatus):

- `PENDING`: the bill was received and is awaiting processing
- `SETTLED`: paid out successfully
- `FAILED`: payout failed
- `WIN`: the round closed as a win
- `LOSE`: the round closed as a loss
- `CANCELLED`: the entry was cancelled
- `REFUND`: cancelled and refunded successfully (the cancel callback succeeded)

Response:

```json
{ "total": 120, "take": 10, "skip": 0, "data": [ { "id": "string", "roundStartDate": "2026-03-12T08:00:00.000Z", "roundEndDate": "2026-03-12T09:00:00.000Z", "gameName": "Thai Government Lottery", "gameCode": "THAI_GOV", "totalAmount": 1000, "totalPayoff": 1500, "userId": "player123", "status": "WIN", "createdAt": "2026-03-12T08:10:00.000Z", "updatedAt": "2026-03-12T09:05:00.000Z", "poys": [ { "id": "string", "userId": "player123", "multiple": 1, "poyType": "THREE_UP", "poyNumber": "123", "amount": 100, "payoff": 900, "rate": 9, "status": "SUCCESS", "createdAt": "2026-03-12T08:11:00.000Z", "updatedAt": "2026-03-12T09:05:00.000Z", "subPoys": [ { "id": "string", "poyType": "TWO_UP", "poyNumber": "12", "amount": 50, "payoff": 0, "multiplier": 1, "status": "FAILED", "createdAt": "2026-03-12T08:11:00.000Z", "updatedAt": "2026-03-12T09:05:00.000Z" } ] } ] } ] }
```

##### Response:

###### Root level ( `GetPoyGroupHistoryByUserResponse` )

- `data`: the user's bill groups ( `PoyGroupHistoryItem[]` ) matching the filter and pagination
- `total`: how many bill groups match (before skip/take)
- `skip`: how many to skip (the pagination offset)
- `take`: how many per page (the pagination limit)

###### Bill-group level ( `PoyGroupHistoryItem` )

- `id`: the bill group's transaction ID (for reference / confirmation with the operator)
- `roundStartDate` : when the round started
- `roundEndDate` : when the round closed
- `gameName`: the game name (some types append a set suffix)
- `gameCode`: the game code
- `totalAmount` : the total the user bet in this bill group
- `totalPayoff` : the total paid or returned to the user in this bill group
- `userId`: the ID of the user who bet
- `status`: the bill group's status (e.g. `PENDING`, `SETTLED`, `WIN`, `LOSE`, `FAILED`, `CANCELLED` , `REFUND` )
- `createdAt`: when the bill group was created
- `updatedAt`: when it was last updated
- `poys`: the sub-bills ( `PoyHistoryItem[]` ) in this bill group

###### Bill level ( `PoyHistoryItem` )

- `id`: the sub-bill ID
- `userId`: the user ID
- `multiple`: the multiple (how many times the stake per set)
- `poyType`: the number type / format (e.g. TWO_UP, THREE_DOWN, SET_FOUR)
- `poyNumber`: the number bet (string)
- `amount`: the stake on this bill
- `payoff`: the amount paid or returned on this bill
- `rate`: the rate used in the calculation
- `status`: the sub-bill's status
- `createdAt`: when the bill was created
- `updatedAt`: when it was last updated
- `subPoys`: lower-level sub-bills (present in some cases, such as set games)

###### subPoy level ( `SubPoyHistoryItem` )

- `id`: the SubPoy ID
- `poyType`: the sub-bill's number type
- `poyNumber`: the sub-bill's number
- `amount`: the amount the sub-bill refers to
- `payoff`: the amount paid on the sub-bill
- `multiplier` : the sub-bill's prize multiplier
- `status`: the sub-bill's status
- `createdAt`: when it was created
- `updatedAt`: when it was last updated

Structure summary:

Response = the bill groups (

data

) + pagination (

total

,

skip

,

take

) and each bill group contains

poys

with some types carrying

subPoys

one level deeper

### 11. Per-player transaction history

An endpoint for pulling the game transaction history (bet / settle / cancel) of players in your line, filterable by player name and date range, with pagination — suited to a history page or to checking a player's bet volume and win/loss

Request:

```json
POST /api/external/get-transaction-by-username
Content-Type: application/json
Authorization: YOUR_PRIVATE_KEY

{
  "agentId": "string",
  "username": "player123", // optional
  "startDate": "2026-06-01T00:00:00.000Z", // optional
  "endDate": "2026-06-19T23:59:59.999Z", // optional
  "skip": 0, // optional (default: 0)
  "take": 10 // optional (default: 10)
}
```

##### Request body:

- `agentId` (required): your agent ID (the owner of the private key)
- `username` (optional): the player's name on the agent side — omit it to get entries for every player in your line
- `startDate` (optional): start time (ISO 8601)
- `endDate` (optional): end time (ISO 8601)
- `skip` (optional): how many entries to skip (default: 0)
- `take` (optional): entries per page (default: 10)

Note:

every entry is scoped to players under your agent (by private key) — you cannot see another agent

'

s data even with a matching username

Response:

```json
{
  "total": 2,
  "take": 10,
  "skip": 0,
  "data": [
    {
      "id": "string",
      "providerTransactionId": "string",
      "usernamePlayer": "player123",
      "betAmount": 100,
      "settleAmount": 0,
      "turnOver": 100,
      "transferIn": 0,
      "transferOut": 100,
      "gameType": "SLOT",
      "status": "SUCCESS",
      "gameId": "string",
      "agentId": "string",
      "createdAt": "2026-06-19T08:10:00.000Z",
      "updatedAt": "2026-06-19T08:10:05.000Z",
      "isBuyFeature": true,
      "isFreeSpin": false,
      "game": {
        "id": "string",
        "name": "Fortune Gems",
        "code": "JILI_FG",
        "providerId": "string",
        "providerName": "JILI_plus"
      }
    }
  ]
}
```

##### Response:

- `data` the player's transactions matching the filter and pagination
- `total` entries on this page
- `skip` / `take`: the pagination values sent (offset / limit)
- `betAmount` the stake
- `settleAmount` the amount paid back (the win/loss result)
- `turnOver` the entry's turnover
- `isBuyFeature` : `true` when the player bought the feature (Buy Feature) on that round
- `isFreeSpin` : `true` when the round is a spin the player did not pay extra for — covering in-game free spins, re-spins and rounds carried over from a previous bet, which is why these entries usually have `betAmount` of 0 but still pay out
- **Both fields are null when the provider does not send us this information** — that does not mean the player did not buy the feature or that it was not a free spin, it means the provider never told us, so do not count `null` as `false` in your reports · see the table below for which providers do and do not send it
- `status`: the entry's status ( `PENDING`, `SUCCESS`, `FAILED`)
- `game`: game details such as `name`, `code`, `providerName` (the provider's name)

How isBuyFeature and isFreeSpin differ

`isBuyFeature` = this round comes from a feature the player paid a lump sum to buy straight into, rather than waiting to trigger it. The buy-in is usually around 100x their normal stake, so the round where they paid carries an unusually high betAmount compared with that same player's other rounds

`isFreeSpin` = a round the player did not pay extra for, carried over from a previous round — in-game free spins, re-spins and continuation rounds all count. That is why these rounds usually have betAmount 0 while still paying out

The two normally come together — the player buys the feature on one round (isBuyFeature) and then gets several free rounds after it (isFreeSpin). When you compute turnover or real stake, take care not to count the free rounds as money the player put in

Some providers (e.g. PG and AMB) also mark the free rounds that follow a purchase with isBuyFeature, so those rounds are true on both fields and have betAmount 0 — to count how many times players bought the feature, count only rounds where isBuyFeature is true and isFreeSpin is not true, or the PG figure comes out roughly 20 times too high

⚠️ null does not mean "did not buy" or "not a free spin"

- null means the provider does not send us this information — so we do not know whether the player bought the feature or whether it was a free spin. Only false means the provider told us "no"
- In the callback we only attach the field when it is true — if it is absent, check the table below: for a ✅ provider it means "no", for a ⚠️ or ❌ provider it means "unknown"
- Do not count null as false in your reports, or the numbers will say almost nobody ever bought the feature — which is not true

Which providers have isBuyFeature / isFreeSpin

| Provider | `isBuyFeature` | `isFreeSpin` |
| --- | --- | --- |
| PG_plus, JILI_plus, JOKER_plus, NOLIMITCITY_plus, EVOPLAY_plus, FACHAI_plus | ✅ | ✅ |
| NEXTSPIN_plusNew provider (Oct 2026), still being confirmed against real transactions | ⚠️ | ⚠️ |
| PG | ✅ | ✅ |
| AMB | ✅ | ✅ |
| 759GAMING, AFB1188_SLOT, AMBGAMING | ✅ | ✅ |
| JILI | ✅ | ❌ |
| PP | ✅ | ❌ |
| OCTOPLAYsent only on rounds where the feature was bought | ⚠️ | ❌ |
| CLOTPLAYsent on roughly half of the records | ⚠️ | ❌ |
| BOOMING, YGR, I8 | ❌ | ✅ |
| JOKERsent only on bonus rounds | ❌ | ⚠️ |
| NEXTSPINsent only on rounds that are free spins | ❌ | ⚠️ |
| BIGPOT, HOTDOG, FUNKYsent on roughly half of the records | ❌ | ⚠️ |
| SA_plus, SEXY_pluslive casino, the feature does not exist here | always false | always false |

✅ sent on every record · ⚠️ sent on some records only, treat a missing value as unknown, not false · ❌ never sent, always null

Every other provider has neither — always null

- Every other _plus provider not in the table, e.g. PRAGMATIC_plus, CQ9_plus, HABANERO_plus, HACKSAW_plus, JDB_plus, KA_plus, PLAYSON_plus, SPRIBE_plus, TADA_plus, 3OAKS_plus — these run on a different upstream system from the _plus providers in the table, even though the names end in _plus the same way
- PNG, HAB, RLX, NE, RTG, WAZ, YGG, PRG, NLC, EVP and FCG
- Other slot providers, e.g. ROYAL, LIVE22, SLOTXO, RICH88, PRETTY, SPADE, KINGMAKER
- Live casino, sports and lottery (SA, SEXY, DG, WM, SBO, BTI, UFAPLUS, HIPPO, HUAYDRAGON, LEKTHONG) — free spin / buy feature does not exist in these products

**Provider names can repeat** — JILI_plus and JILI, PG_plus and PG, NOLIMITCITY_plus and NLC, EVOPLAY_plus and EVP, NEXTSPIN_plus and NEXTSPIN are different providers on different systems, and they do not support these fields the same way. Key your reports on providerId, not the provider name

### 12. Per-round detail link

An endpoint for requesting the history page of a single round, so you can look back at what happened — a slot replay, the cards of a live casino hand, or a sports bet slip. Send the entry id you got from step 11 and the system returns a link that opens straight away. Ideal for a "view result" button on a player's history page, or for checking when a player asks. **Available for 7 days from the time of the bet** — after that the provider no longer keeps the data.

Request:

```json
POST /api/external/get-bet-detail-url
Content-Type: application/json
Authorization: YOUR_PRIVATE_KEY

{
  "agentId": "string",
  "transactionId": "string", // optional
  "providerTransactionId": "string", // optional
  "lang": "th" // optional (default: en)
}
```

##### Request body:

- `agentId` (required): your agent ID (the owner of the private key)
- `transactionId` (optional): our-side entry id — the `id` you got from step 11
- `providerTransactionId` (optional): the provider-side entry id — the `providerTransactionId` you got from step 11 (the same id you see in the provider's back office)
- `lang` (optional): the language of the history page. `th` and `en` are supported (default: `en`) — providers that do not support choosing a language ignore it.

Note:

you must send at least one of

transactionId

or

providerTransactionId

(if you send both, the system uses

transactionId

first)

Response:

```json
{
  "provider": "BTI",
  "type": "url",
  "url": "https://api.neoapihub.com/api/external/bet-detail-view?t=eyJhbGciOi...",
  "expiresInSeconds": 900
}
```

##### Response:

- `provider` the provider this entry happened on
- `type`: currently always `url`, whether the destination is the provider's own page or one we assemble — you can open the link directly without branching.
- `url` the link to that round's history page. It opens without any headers, so you can hand it straight to the player — usually the provider's own page on their domain. For providers that have none, we assemble a summary page and return a link on our own domain instead.
- `expiresInSeconds` the link's lifetime in seconds — present only on links whose page we assemble ourselves, which is `900` (15 minutes). Links that are the provider's own page do not carry this field; follow that provider's rules. Either way you can request a fresh link with the same id at any time, so there is no need to keep the old one.

##### Errors you may receive:

- `BET_DETAIL_ID_REQUIRED` (400): no id was sent at all
- `TRANSACTION_NOT_FOUND` (404): no such entry
- `BET_DETAIL_TOO_OLD` (410): the round is older than the provider retains ( `retentionDays` and `roundAgeDays` are returned too)
- `BET_DETAIL_NOT_SUPPORTED` (400): this provider has no per-round detail page (a `reason` from the provider is returned too)
- `BET_DETAIL_UNAVAILABLE` (503): the provider could not answer at that moment; you can retry

**Limitations to be aware of:**

- **Up to 7 days back** — this is what we support, set by the provider that keeps data for the shortest time. Anything older returns `BET_DETAIL_TOO_OLD` (some providers keep it longer, but don't design around that)
- **Links expire** after `expiresInSeconds` — request one when the player asks to view it, not in advance to store
- **Unsettled rounds** return a summary page with status `IN_PLAY` and the bet amount instead of the full history, because the provider only writes the report once the round settles
- Most providers rate-limit these calls. Don't fire them in bursts to pull many rounds at once — call one when a player actually asks to view it.
- The link opens without authentication — you can send it to the player it belongs to, but it should not be posted publicly, since anyone with it can view that player's round until it expires

### Error format

- `INVALID_PRIVATE_KEY` : the private key attached is wrong
- `USERNAME_ALREADY_EXISTS` : duplicate username on create-user
- `USERNAME_NOT_FOUND` : no player found for the username sent
- `INSUFFICIENT_BALANCE` : withdrawal exceeds the balance

### More APIs

Coming Soon
