Documentation Index Fetch the complete documentation index at: https://docs.cog888.net/llms.txt
Use this file to discover all available pages before exploring further.
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
Type credit Directioncanceled_idSpecial Handling 8 Payout Positive (win) or 0 (lose) Empty Normal settlement, includes win/loss amount 10 Round Recalculation Difference (can be positive or negative) Empty Due to on-site anomaly, system backend adjusts original payout difference 11 Cancel Round Positive (refund bet) Empty Due to on-site anomaly, system backend refunds all bets for the round 12 Add Order Positive for win, negative for lose (win/loss value) Empty Due to on-site anomaly, system backend adds order, directly in settled status 13 Cancel Order Positive (refund bet) Empty Due to on-site anomaly, system backend cancels order 23 Bet Failure Refund Positive Original transaction ID Betting 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 Order Difference (can be positive or negative) Empty 1. Only for traditional orders, due to on-site anomaly, system backend modifies order 2. Used to update hedge valid bet amount 29 Credit Rollback Positive Original transaction ID General 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 Type Hedge 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:
Check if hedge orders exist in the same round
If hedges exist, recalculate valid_amount for both sides
Insert Type 26 record to notify seamless wallet of valid_amount changes
Type 26 Hedge Sync Fields
Field Value Description type26 Modify order creditFixed at 0 Does not affect credit, only syncs valid bet amount valid_amountAdjusted value Recalculated 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
Step Action Type credit Description 1 Bet 100 on Banker 7 -100 Deduction 2 Bet 100 on Player 7 -100 Deduction 3 Result: Banker wins, Payout 8 +200 Banker bet wins (1:1, return principal + winnings) 4 (same round) 8 0 Player bet loses 5 Backend recalculates to Player wins 10 -200 Banker (originally won becomes lost, deduct payout) 6 (same round) 10 +200 Player (originally lost becomes won, issue payout) 7 Backend cancels round 11 +100 Refund Banker bet 8 (same round) 11 +100 Refund Player bet
Payload:
Steps 1-2: Bet Deduction (Type 7)
{
"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"
}
}
]
}
Steps 3-4: Payout (Type 8) + Hedge Sync (Type 26)
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"
}
}
]
}
Steps 5-6: Round Recalculation (Type 10) + Hedge Sync (Type 26)
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"
}
}
]
}
Steps 7-8: Cancel Round (Type 11) + Hedge Sync (Type 26)
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
Step Action Type credit Description 1 Bet 100 on Banker 7 -100 Deduction 2 Result: Banker wins, Payout 8 +200 Win (1:1, return principal + winnings) 3 Backend cancels order 13 -100 Deduct difference (paid 200 - refund bet 100 = deduct 100)
Payload:
Step 1: Bet Deduction (Type 7)
{
"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"
}
}
]
}
Step 3: Cancel Order (Type 13)
{
"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
Step Action Type credit canceled_id 1 Bet 100 (simulate no response received) 7 -100 - 2 Trigger bet failure refund 23 +100 Step 1’s transaction ID
Payload:
Step 1: Bet Deduction (Type 7)
{
"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"
}
}
]
}
Step 2: Bet Failure Refund (Type 23)
{
"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
Case Covered Types Case 1 8, 10, 11, 26 Case 2 8, 13 Case 3 23