Notification Process

Learn about how the notifications of the Cashout API work

Notifications

A notification will be sent every time the status of a cashout changes.

For security reasons, we don't send the status of the cashout on the notification itself. Once you have received the notification, you will need to use the Cashout Status Endpoint to retrieve its new status.

The notifications will be sent to the notification_url specified in the request or to the default Withdrawals URL you have configured on the Merchant Panel by POST protocol in x-www-form-urlencoded format.

STG Testing

In the STG environment, you can force a notification to be sent to your notification_url from the STG Merchant Panel by going to the Transactions -> Withdrawals page, opening the cashout transaction, and clicking on one of the options that will appear when clicking on the three dots button on the top right of the screen. Those options will change the status of the cashout therefore sending the respective notification after a few minutes.

Notification response

    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

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 secret key (API Signature) and should be in uppercase

Make sure to hash the message in UTF-8 format to prevent errors.

Example:

public static void main(String[] args) throws IOException, NoSuchAlgorithmException, InvalidKeyException {
      String external_id = "cashoutID1234";
      String message = "Be4" + external_id + "Bo7";
      String apiSignature = "your_deposits_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)));
}

Retry logic and Resend Notifications

Every time a cashout changes its status, we will send you a notification so you can check its 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.

Última actualización

¿Te fue útil?