HTTP Callbacks

Callbacks are used for session and transaction updates. Listen to the callbacks on deposits and withdrawals, by submitting the callback URL and the State ID in the callbacks parameters. Respond with a HTTP 200 OK to let Brite know that the notifications has been received.

Please note that callback are not necessarily fired in order so please make sure to have logic in place to handle this. 

Session callbacks

Brite backend supports the following callbacks for session states:

To subscribe to callbacks. Populate the callbacks with a URL which the callbacks should be sent to and the desired state. Same URL can be used for several states but every callback need to be populated separately in the request.

				
					// example request parameters
"callbacks": [
{"url": "https://<some_url>", "session_state": 2}, 
{"url": "https://<some_url>", "session_state": 10}, 
{"url": "https://<some_url>", "session_state": 11}, 
{"url": "https://<some_url>", "session_state": 12}, 
]
				
			

The push notification is a JSON POST with the following body

				
					// example request callbacks
{
"session_state": 2,
"session_id": "string",
"merchant_id": "string"
}
				
			

Transaction callbacks

Brite backend supports the following callbacks for transaction states:

To subscribe to callbacks. Populate the callbacks with a URL which the callbacks should be sent to and the desired state. Same URL can be used for several states but every callback need to be populated separately in the request.

				
					// example request - parameters
"callbacks": [
{"url": "some_url", "transaction_state": 2},
{"url": "some_url", "transaction_state": 3},
{"url": "some_url", "transaction_state": 5},
{"url": "some_url", "transaction_state": 7}
]
				
			

The push notification is a JSON POST with the following body

				
					// example request callbacks
{
"transaction_state": "X",
"transaction_id": "Y",
"merchant_id": "Z"
}
				
			

Since the data is pushed in the open, the merchant is always required to verify the state on their end. This can be done by calling session.state or transaction.state endpoint.

It is important to note that subscribing to these callbacks, and particularly to STATE_CREDIT = 5, will enable you as a merchant to act on crediting the end user upon receiving the STATE_CREDIT notification from Brite.

Retries

If a notifications has not received a 200 OK response Brite retries sending the state callbacks up to an hour. If the callback fails another attempt will be triggered after 10, 30 and then finally 60 minutes. 

IP Whitlist

Please note that in order to use this service you must whitelist the following IP addresses:

SandboxProduction
35.228.90.5235.228.90.52
34.107.68.17534.107.68.175
34.159.115.16634.141.92.135
34.141.92.13534.141.49.184
34.141.49.18435.246.194.85
35.246.194.85

Table of contents