Integrate payment
Prepare
To integrate the platform's payment system and allow players to make in-game purchases or top up their accounts on the website, developers need to submit a list of game items that players can buy to the platform, including:
Product name
Need
Product introductio
Need,less than 50 characters
In-game amoun
Need,integer
Price(USDT)
Need,integer,Example: 100 = 1U
Is there a double reward
rate
integer
Is there a purchase limit
Purchase limit
integer
In addition to submitting a product list to the platform, game developers also need to provide the platform with an API for in-app purchase callbacks, supporting HTTPS and capable of receiving POST requests.
Example: https://topup.game1.com/payhook...
Progress

Introduction:
The player's purchase occurs on the website. After payment is completed, the game client is notified to ship the goods.
The game client verifies the purchase and sends the purchased item to the player's game account.
Mokoko is then notified to complete the transaction.
When making a payment, the content and format sent to the game client are as follows. Developers need to receive and parse the relevant content themselves to send the goods to the players.
{
"sign": "eKcA0zUJMojb5Ryp94vg12DF.......Zm43sA==",
"data": {
"order": {
"orderId": "92465065984_1744288332_783239ed-5829-4e4d-afb0-481b3763025a",
"chainId": 1329,
"productId": 1001,
"orderType": 1,
"gameId": 92465065984,
"purchasePrice": 99,
"paymentPrice": "64815...1228000",
"paymentType": 1004,
"purchaseBy": "1172044...15782",
"status": 3,
"txn": "B80D5A230D1B63387.......8BAF05F057B947CF6975C52E3",
"signId": 0,
"fromAddress": "0x0C3e52ba4E65.......26872313f8",
"toAddress": "0xD1Aa58934......8E9297A330c5D63b",
"blockNumber": 0,
"isConfirmed": false,
"metaData": "",
"webHook": "https://paymentWebHook",
"checkTimes": 0,
"notifyTimes": 0,
"createdAt": "2025-04-10T12:32:12.453Z"
},
"product": {
"gameId": 92465065984,
"productId": 1001,
"productName": "100 Mana Stone",
"productImg": "https://....100g.png",
"productDes": "100 Mana Stone",
"productIndex": 7,
"productDoubleRate": 0,
"productDoubleDesc": "",
"productPrice": 99,
"productStar": 50,
"productNum": 100,
"productBuyLimit": 0,
"status": 1,
"createTime": "2024-11-20T22:09:15Z"
}
}
}Explanation of some fields:
orderType
1 = top up order,2 = check in order
signId
If the order type is 2, the signId is used to determine the specific sign-in content and perform game-related business processing.
productId
Product ID, generated by the Mokoko backend, can be consistent with the game backend.
Integer type
gameId
Key ID,every game is unique.
purchasePrice
Product Price
purchaseBy
Buyer, String type, is the third-party account ID used to locate the player and deliver the goods.
txn
On-chain transaction hash
fromAddress
The wallet address of the buyer
Last updated