Skip to main content

SyncCredit API Common Payload Structure

All types use the same dt/callback/sync_credit API with the following payload format:
{
  "platform_id": "Product code",
  "uuid": "Unique identifier",
  "account": "Player account",
  "token": "MD5 verification code",
  "info": [
    {
      "type": Transaction type code,
      "credit": Credit change (positive=deposit, negative=deduction),
      "order_id": "Bet order ID",
      "canceled_id": "Canceled transaction ID (only for cancellation types)",
      "transaction_id": "Transaction ID",
      "proposal_id": "Proposal ID",
      "ip": "Player IP",
      "target_wallet": Target wallet (0=regular, 1=traditional proposal wallet),
      "rolling_unit": Rolling unit,
      "ratio": Commission ratio,
      "order_detail": {
        "room_account": "Room account",
        "in_proposal": Is in traditional proposal (1=no, 2=yes),
        "table_id": "Table ID",
        "gmcode": "Game round code",
        "game_type": "Game type",
        "play_type": Play type,
        "amount": Bet amount,
        "valid_amount": Valid bet amount,
        "win": Win/loss value,
        "flag": Status flag,
        "create_time": Creation time,
        "reckon_time": Reckon time,
        "last_update_time": Last update time,
        "round_detail": "Round result details"
      }
    }
  ]
}

Key Differences by Type

Typecredit Directioncanceled_idSpecial Handling
8 PayoutPositive (win) or 0 (lose)EmptyNormal settlement, includes win/loss amount
10 Round RecalculationDifference (can be positive or negative)EmptyDue to on-site anomaly, system backend adjusts original payout difference
11 Cancel RoundPositive (refund bet)EmptyDue to on-site anomaly, system backend refunds all bets for the round
12 Add OrderPositive for win, negative for lose (win/loss value)EmptyDue to on-site anomaly, system backend adds order, directly in settled status
13 Cancel OrderPositive (refund bet)EmptyDue to on-site anomaly, system backend cancels order
23 Bet Failure RefundPositiveOriginal transaction IDBetting party did not receive bet response, transaction invalid. You need to verify if original transaction ID had a deduction, and rollback if so
26 Modify OrderDifference (can be positive or negative)Empty1. Only for traditional orders, due to on-site anomaly, system backend modifies order 2. Used to update hedge valid bet amount
29 Credit RollbackPositiveOriginal transaction IDGeneral rollback mechanism for scenarios like tip failure, similar to type 23, means betting party did not receive deduction response, transaction invalid, you need to verify if original transaction ID had a deduction, and rollback if so

Additional Note: Type 26 Hedge Sync Mechanism

In Test Case 1, Payout (Type 8) and Round Recalculation (Type 10) are accompanied by additional Type 26 (credit=0) records. This is due to the Hedge Calculation mechanism.

Trigger Conditions

When a player has hedge bets in the same round (e.g., betting on both Banker and Player), the system automatically generates Type 26 records during payout or recalculation:
Game TypeHedge Play Types
Baccarat (BAC) / Niu Niu (NIU)playtype 1 (Banker) ↔ playtype 2 (Player)
Roulette (ROU)playtype 151-156 are mutual hedges
Dragon Tiger (DTB)Multiple hedge play types (1↔2, 4↔5, 6↔7, 8↔9, 10↔11)

Logic Description

When processing payouts/recalculations for orders with hedge bets, the system will:
  1. Check if hedge orders exist in the same round
  2. If hedges exist, recalculate valid_amount for both sides
  3. Insert Type 26 record to notify seamless wallet of valid_amount changes

Type 26 Hedge Sync Fields

FieldValueDescription
type26Modify order
creditFixed at 0Does not affect credit, only syncs valid bet amount
valid_amountAdjusted valueRecalculated valid bet amount

Example

In Case 1, betting “100 on Banker” and “100 on Player” simultaneously creates a hedge:
  • Processing Banker (playtype=1) payout → generates Player’s Type 26 (credit=0)
  • Processing Player (playtype=2) payout → generates Banker’s Type 26 (credit=0)

Test Cases

Case 1: Normal Flow → Round Recalculation → Cancel Round

Covered Types: 8 Payout, 10 Round Recalculation, 11 Cancel Round Card Settings:
  • Original result (Banker wins): Player [♠ 2, ♥3] = 5 points, Banker [♦K, ♣9] = 9 points → Banker Wins
  • Recalculated result (Player wins): Player [♠ 9, ♥8] = 7 points, Banker [♦4, ♣2] = 6 points → Player Wins
StepActionTypecreditDescription
1Bet 100 on Banker7-100Deduction
2Bet 100 on Player7-100Deduction
3Result: Banker wins, Payout8+200Banker bet wins (1:1, return principal + winnings)
4(same round)80Player bet loses
5Backend recalculates to Player wins10-200Banker (originally won becomes lost, deduct payout)
6(same round)10+200Player (originally lost becomes won, issue payout)
7Backend cancels round11+100Refund Banker bet
8(same round)11+100Refund Player bet
Payload:
{
  "account": "st",
  "platform_id": "H88",
  "info": [
    {
      "type": 7,
      "credit": -100,
      "order_id": "9D13260123191230010000001",
      "transaction_id": "9D13260123191230010000001-260123191230-0000001",
      "proposal_id": "958936",
      "order_detail": {
        "play_type": 1,
        "amount": 100,
        "gmcode": "9D13261231KK",
        "game_type": "BAC_CF",
        "table_id": "9D13",
        "room_account": "9D"
      }
    },
    {
      "type": 7,
      "credit": -100,
      "order_id": "9D13260123191230020000002",
      "transaction_id": "9D13260123191230020000002-260123191230-0000002",
      "proposal_id": "958936",
      "order_detail": {
        "play_type": 2,
        "amount": 100,
        "gmcode": "9D13261231KK",
        "game_type": "BAC_CF",
        "table_id": "9D13",
        "room_account": "9D"
      }
    }
  ]
}
The following is a single API request with multiple Objects in the info array, process them in order.
{
  "account": "st",
  "platform_id": "H88",
  "info": [
    {
      // [1] Banker payout: Win 100 (return principal 100 + winnings 100 = 200)
      "type": 8,
      "credit": 200,
      "canceled_id": "",
      "order_id": "9D13260123191230010000001",
      "transaction_id": "9D13260123191230010000001-1-bac.9d-260123191950",
      "order_detail": {
        "play_type": 1,
        "amount": 100,
        "valid_amount": 100,
        "win": 100,
        "flag": 1,
        "round_detail": "34 51;13 25|3|9|5|0"
      }
    },
    {
      // [2] Hedge sync: Update Banker's valid_amount to 0 (hedged with Player)
      "type": 26,
      "credit": 0,
      "canceled_id": "",
      "order_id": "9D13260123191230010000001",
      "transaction_id": "9D13260123191230010000001-1-lobby1-260123191952",
      "order_detail": {
        "play_type": 1,
        "amount": 100,
        "valid_amount": 0,
        "win": 100,
        "flag": 1,
        "round_detail": "34 51;13 25|3|9|5|0"
      }
    },
    {
      // [3] Player payout: Lose 100 (credit=0, already deducted when betting)
      "type": 8,
      "credit": 0,
      "canceled_id": "",
      "order_id": "9D13260123191230020000002",
      "transaction_id": "9D13260123191230020000002-2-bac.9d-260123191950",
      "order_detail": {
        "play_type": 2,
        "amount": 100,
        "valid_amount": 0,
        "win": -100,
        "flag": 1,
        "round_detail": "34 51;13 25|3|9|5|0"
      }
    }
  ]
}
The following is a single API request with multiple Objects in the info array, process them in order.
{
  "account": "st",
  "platform_id": "H88",
  "info": [
    {
      // [1] Hedge sync: Update Player's valid_amount
      "type": 26,
      "credit": 0,
      "canceled_id": "",
      "order_id": "9D13260123191230020000002",
      "transaction_id": "9D13260123191230020000002-2-lobby1-260123193239",
      "order_detail": {
        "play_type": 2,
        "amount": 100,
        "valid_amount": 0,
        "win": -100,
        "flag": 1,
        "round_detail": "41 56;4 18|4|6|7|0"
      }
    },
    {
      // [2] Banker recalculation: Originally won becomes lost, deduct payout 200
      "type": 10,
      "credit": -200,
      "canceled_id": "",
      "order_id": "9D13260123191230010000001",
      "transaction_id": "9D13260123191230010000001-1-bac.9d-260123193239",
      "order_detail": {
        "play_type": 1,
        "amount": 100,
        "valid_amount": 0,
        "win": -100,
        "flag": 1,
        "round_detail": "41 56;4 18|4|6|7|0"
      }
    },
    {
      // [3] Hedge sync: Update Banker's valid_amount
      "type": 26,
      "credit": 0,
      "canceled_id": "",
      "order_id": "9D13260123191230010000001",
      "transaction_id": "9D13260123191230010000001-1-lobby1-260123193239",
      "order_detail": {
        "play_type": 1,
        "amount": 100,
        "valid_amount": 0,
        "win": -100,
        "flag": 1,
        "round_detail": "41 56;4 18|4|6|7|0"
      }
    },
    {
      // [4] Player recalculation: Originally lost becomes won, issue payout 200
      "type": 10,
      "credit": 200,
      "canceled_id": "",
      "order_id": "9D13260123191230020000002",
      "transaction_id": "9D13260123191230020000002-2-bac.9d-260123193239",
      "order_detail": {
        "play_type": 2,
        "amount": 100,
        "valid_amount": 0,
        "win": 100,
        "flag": 1,
        "round_detail": "41 56;4 18|4|6|7|0"
      }
    }
  ]
}
The following is a single API request with multiple Objects in the info array, process them in order.
{
  "account": "st",
  "platform_id": "H88",
  "info": [
    {
      // [1] Hedge sync: Update Player's valid_amount
      "type": 26,
      "credit": 0,
      "canceled_id": "",
      "order_id": "9D13260123191230020000002",
      "transaction_id": "9D13260123191230020000002-2-lobby1-260123194449",
      "order_detail": {
        "play_type": 2,
        "amount": 100,
        "valid_amount": 100,
        "win": 100,
        "flag": 1,
        "round_detail": "41 56;4 18|4|6|7|0"
      }
    },
    {
      // [2] Cancel Banker: Refund bet amount 100 (flag=-8 indicates canceled)
      "type": 11,
      "credit": 100,
      "canceled_id": "",
      "order_id": "9D13260123191230010000001",
      "transaction_id": "9D13260123191230010000001-1-bac.9d-260123194448",
      "order_detail": {
        "play_type": 1,
        "amount": 0,
        "valid_amount": 0,
        "win": 0,
        "flag": -8,
        "round_detail": "41 56;4 18|4|6|7|0"
      }
    },
    {
      // [3] Cancel Player: Deduct already paid amount 100 (flag=-8 indicates canceled)
      "type": 11,
      "credit": -100,
      "canceled_id": "",
      "order_id": "9D13260123191230020000002",
      "transaction_id": "9D13260123191230020000002-2-bac.9d-260123194448",
      "order_detail": {
        "play_type": 2,
        "amount": 0,
        "valid_amount": 0,
        "win": 0,
        "flag": -8,
        "round_detail": "41 56;4 18|4|6|7|0"
      }
    }
  ]
}

Case 2: Normal Flow → Cancel Order

Covered Types: 8 Payout, 13 Cancel Order Card Settings:
  • Result (Banker wins): Player [♠ 4, ♥2] = 6 points, Banker [♦7, ♣K] = 7 points → Banker Wins
StepActionTypecreditDescription
1Bet 100 on Banker7-100Deduction
2Result: Banker wins, Payout8+200Win (1:1, return principal + winnings)
3Backend cancels order13-100Deduct difference (paid 200 - refund bet 100 = deduct 100)
Payload:
{
  "account": "st",
  "platform_id": "H88",
  "info": [
    {
      "type": 7,
      "credit": -100,
      "order_id": "9D13260123195630010000004",
      "transaction_id": "9D13260123195630010000004-260123195630-0000004",
      "proposal_id": "958936",
      "order_detail": {
        "play_type": 1,
        "amount": 100,
        "gmcode": "9D13261231KO",
        "game_type": "BAC_CF",
        "table_id": "9D13",
        "room_account": "9D"
      }
    }
  ]
}
{
  "account": "st",
  "platform_id": "H88",
  "info": [
    {
      "type": 8,
      "credit": 200,
      "canceled_id": "",
      "order_id": "9D13260123195630010000004",
      "transaction_id": "9D13260123195630010000004-1-bac.9d-260123195703",
      "order_detail": {
        "play_type": 1,
        "amount": 100,
        "valid_amount": 100,
        "win": 100,
        "flag": 1,
        "round_detail": "36 50;7 29|3|7|6|0"
      }
    }
  ]
}
{
  "account": "st",
  "platform_id": "H88",
  "info": [
    {
      // Cancel order: Deduct difference 100 (paid 200, after cancellation need to deduct 100)
      "type": 13,
      "credit": -100,
      "canceled_id": "",
      "order_id": "9D13260123195630010000004",
      "transaction_id": "9D13260123195630010000004-1-bac.9d-260123195728",
      "order_detail": {
        "play_type": 1,
        "amount": 0,
        "valid_amount": 0,
        "win": 0,
        "flag": -8,
        "round_detail": "36 50;7 29|3|7|6|0"
      }
    }
  ]
}

Case 3: Bet → Bet Failure Refund

Covered Types: 23 Bet Failure Refund
StepActionTypecreditcanceled_id
1Bet 100 (simulate no response received)7-100-
2Trigger bet failure refund23+100Step 1’s transaction ID
Payload:
{
  "account": "st",
  "platform_id": "H88",
  "info": [
    {
      "type": 7,
      "credit": -100,
      "order_id": "9D13260123200228010000005",
      "transaction_id": "9D13260123200228010000005-260123200228-0000005",
      "proposal_id": "958936",
      "order_detail": {
        "play_type": 1,
        "amount": 100,
        "gmcode": "9D13261231KQ",
        "game_type": "BAC_CF",
        "table_id": "9D13",
        "room_account": "9D"
      }
    }
  ]
}
{
  "account": "st",
  "platform_id": "H88",
  "info": [
    {
      // Bet failure refund: canceled_id is the original bet's transaction_id
      "type": 23,
      "credit": 100,
      "canceled_id": "9D13260123200228010000005-260123200228-0000005",
      "order_id": "9D13260123200228010000005",
      "transaction_id": "9D13260123200228010000005-260123200228-0000005RB",
      "order_detail": {
        "play_type": 1,
        "amount": 0,
        "valid_amount": 0,
        "win": 0,
        "flag": 0,
        "round_detail": ""
      }
    }
  ]
}

Test Summary

CaseCovered Types
Case 18, 10, 11, 26
Case 28, 13
Case 323