Basically the partner system have to provide a set of API functions for our system to call:
- Fund Transfer
GetUserBalance will be called when the user login to our platform or user click refresh balance in the web client.
Fund Transfer function includes four types of transfer:
- It is sent to the partner system when the user going to place a bet. The function will be timed out after 3 seconds and PlaceBetCancel will be sent.
- When a bet placed before is winning (bet amount + result amount > 0), the total amount (including stakes) will send to partner system.
- When a bet placed before is losing, this request will be sent to the partner system. Although it is no amount adjustment, it is still worth to let partner system to update the state of an open transaction.
- PlaceBetCancel will only be sent when previous PlaceBet is failed due to timeout or partner system error. Partner system should refund the user if the transaction has been done in the partner system side.
For PlayerWin, PlayerLost & PlaceBetCancel request, SimplePlay will keep re-sending it until receiving proper response. If SimplePlay couldn’t receive proper response after 2 hours, SimplePlay will consider it as failed and move it to unsuccessful transaction list.
- Received GetUserBalance request: No balance adjustment is required, return error=0 with user’s current balance.
- Received PlaceBet request: Deduct the bet amount, return us error=0 with user’s current balance.
- Received PlayerWin request: Credit balance to user, return us error=0 with user’s current balance.
- Received PlayerLost request: No balance adjustment is required, return us error=0 with user’s current balance.
- Received PlaceBetCancel request: Refund the corresponding PlaceBet bet amount to user, return us error=0 with user’s current balance.
- Received PlaceBetCancel without corresponding PlaceBet request. No balance adjustment is required, return us error=0with user’s current balance.
> We suggested to record “txn_reverse_id” in PlaceBetCancel request.
> If partner system receive the corresponding PlaceBet request later than PlaceBetCancel request , some incorrect operation requests might happen at partner system. To deal with this weird situation, we suggest partner system should setup a job to run periodically (e.g. every 15 minutes)
- Check all pending PlaceBetCancel request, compare its txn_reverse_id with all PlaceBet request’s txnid for past 15 minutes
- If corresponding PlaceBet request is found, partner system should refund the bet amount to player and finish both PlaceBet & PlaceBetCancel request at partner end
- If corresponding PlaceBet request is NOT found, partner system should finish this PlaceBetCancel request
Note: We suggest the regular check period in every 15 minutes, but it is configurable based on partner system needs.
- Received duplicate PlayerWin, PlayerLost or PlaceBetCancel request. No balance adjustment is required, return us error=0 with user’s current balance.
**All above Fund Transfer functions provide a unique transaction ID and partner system should only process once and only once, but must always respond. SimplePlay platform assumes that the partner system will handle duplicate transaction request properly and send back a success response ( error=0 ) for a request that had already been processed.
Operator should provide these five individual aspx, php, etc. to allow SimplePlay platform to call:
** Operator can only use ONE type of extension, no multiple extension is allowed.