Payment API

The payment API consists of a set of callbacks that needs to be implemented. These are endpoints our platform will do a HTTP POST Request towards to perform one of the three actions:

Responses

Success

If your endpoint returns 200 OK and no object with an error key, the callback will be completed and logged as successful in the Scout Gaming Platform.

Error

When you need to reject a request for a business reason — for instance the user cannot afford the bet — you should return a 4XX status code (HTTP 402 Payment Required is the convention for insufficient funds). Reserve 5XX status codes for temporary technical failures; they signal to our platform that the outcome is unknown and the callback may be re-sent. In both cases return an object with an error key which can be logged and displayed to the user when needed. For instance:

// HTTP Response 402 from callback { "error": "insufficient_funds" }

Timeouts

Our platform waits up to 2 minutes for a response to the Place Bet callback and up to 5 minutes for the Settle Bet and Refund Tournament callbacks. Callbacks that time out or fail are flagged on our side and re-sent, so every endpoint must be idempotent.