Callback Validation
Every callback includes a key and a timestamp field, which must be used to verify the authenticity and freshness of the request.
Validation ensures that the callback:
- Originates from Slotsgateway
- Has not been replayed or delayed
⚠️ Security Requirement
- The received
timestampmust be within the last 30 seconds - If the timestamp is outside this window, you must reject the callback
- Rejected callbacks must return error
2 - Always respond with HTTP status code
200, even on errors
Signature Generation
The key is generated by hashing the timestamp together with your salt key.
- The salt key is unique per API key
- You can rotate or update it at any time in the
Backoffice
Key Construction (JavaScript)
md5(timestamp + saltkey);Key Construction (PHP)
md5($timestamp . $saltkey);Validation Process
- Read the
timestampandkeyfrom the callback - Verify the
timestampis no older than 30 seconds - Recreate the signature using the same timestamp and your salt key
- Compare the generated signature with the received
key - If validation fails, reject the callback
Invalid Signature / Timestamp Response
If the signature does not match or the timestamp validation fails, return:
{
"error": 2,
"balance": 0
}