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. Please note that the aborted/failed states are not necessarily the final state of a transaction.
Session Callbacks #
Brite backend supports the following callbacks for session states:
- STATE_AUTHENTICATION_COMPLETED = 2
- STATE_ABORTED = 10
- STATE_FAILED = 11
- STATE_COMPLETED = 12
Example Request:
"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},
]
Response:
The push notification is a json post with the following body:
{ "merchant_id":"X", "session_id":"Y", "session_state":Z
}
Transaction Callbacks #
Brite backend supports the following callbacks for transaction states:
- STATE_PENDING= 1 (For recurring deposit)
- STATE_ABORTED = 2
- STATE_FAILED = 3
- STATE_CREDIT = 5
- STATE_DEBIT = 7
Example Request:
"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}
]
Example Response:
The push notification is a json post with the following body:
{
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 (using api/transaction.state).
It is important to note that subscribing to these callbacks, and particularly to Credit, will enable you as a merchant to act on crediting the end user upon receiving the STATE_CREDIT notification from Brite.
Retries: #
Brite retries sending the state callbacks up to an hour. If the callback fail another attempt will be triggered after 10, 30 and then finally 60 minutes.
IP WHITELIST: #
Please note that in order to use this service you must whitelist the following IP addresses:
Sandbox
– 35.228.90.52
– 34.107.68.175
– 34.159.115.166
Production
– 35.228.90.52
– 34.107.68.175
– 34.141.92.135