Our API Docs just got a new look!

Notifications

Every time a cashout changes its status, we will send you an asynchronous notification containing the ID of the cashout by POST protocol in x-www-form-urlencoded format.

The webhooks are sent to:

  1. the notification_url you sent in the request, or

  2. to the one you have configured under the section: Settings ➡️ API Access ➡️ Withdrawal URL.

Once received the notification, you should check its new status with the Get cashout status endpoint and update it on your end accordingly.

Firewall configurations

Example notification

    date=2020-03-12%2020%3A26%3A11
    &bank_reference_id=
    &comments=
    &external_id=cashoutV35381
    &control=A4CFF64E78C4BD01F8BFCA4AFF04632EC4A33CC61BD6BBD156BA1289897892EB
    &cashout_id=60067
    &status_reason=
Field
Format
Description

date

Date. Format: YYYY-MM-DD HH:MM:SS (GMT)

Date the cashout changed its status

bank_reference_id

String (max. 50 chars)

Reference ID of the bank if any

comments

String (max. 200 chars)

Comments of the cashout if any

external_id

String (max. 100 chars)

ID of the cashout you sent while creating the request

control

String

Control signature of the notification

cashout_id

Number

ID of the cashout on our end

status_reason

String

Reason of the status if any

Control String

The control string for the notifications is made up of some random characters at the beginning and the end of the request and the external_id received in the middle.

The control string should be generated using your own secret key (API Signature) and must be in upper case.

Make sure you convert the message to hash to UTF-8 to prevent errors.

Check the examples below on how to calculate the control string for the notifications:

public static void main(String[] args) throws IOException, NoSuchAlgorithmException, InvalidKeyException {
      String external_id = "cashoutID1234";
      String message = "Be4" + external_id + "Bo7";
      String apiSignature = "your_cashout_api_signature";

      Mac hasher = Mac.getInstance("HmacSHA256");
      hasher.init(new SecretKeySpec(apiSignature.getBytes(StandardCharsets.UTF_8), "HmacSHA256"));
      byte[] result = hasher.doFinal(message.getBytes(StandardCharsets.UTF_8));

      System.out.println(StringUtils.upperCase(DatatypeConverter.printHexBinary(result)));
}

Testing notification in Staging

Receiving notifications accordingly is part of our integration requirements checklist.

In the Staging environment, in order to test the full flow you can manually set a cashout to COMPLETED, CANCELLED, REJECTED or ON HOLD status by: Logging in into the STG Merchant Panel ➡️ Transactions ➡️ Withdrawals.

Those options will change the status of the deposit, therefore sending the respective notification to your notification_url after a few minutes.

Retry logic

Every time a cashout changes its status, we will send you a notification so you can Get cashout status back.

In case that for some reason your server was unable to receive the notification and you returned an HTTP code different than 2XX, we will retry the notification up to 5 more times or until you respond with HTTP 2XX, whatever comes first.

The time between the 5 notifications attempts will be of 5 minutes each.

When the notification failed to be sent, it will be shown like this in our Merchant Panel:

If you see the errors from the screenshot above, it means the cashout was successfully completed but suddenly we couldn't notify you. Keep reading to know how to resend the notifications.

Resend Notifications

In case your system was unable to receive the notification in any of the 5 attempts, you can always check its status with the Get cashout status

If you need to trigger the check status by receiving our notification, once the issue preventing you from receiving our notifications was fixed, you can go to the Merchant Panel, locate the cashout (Transactions ➡️ Withdrawals) and click on the three dotted button under the section and then "Resend notification" to force a new notification to be sent.🕐 It can take up to 2 minutes for the notification to be resent.

Last updated

Was this helpful?