Payout Notification
About this guide
This guide shows you how to work with payout notifications. The payouts are processed in batch. Each step in the payout processing flow can dispatch notifications to the merchart. We'll guide you through the steps to handle this type of calls.
How it works
Verify the notification signature
When a payout status is changed to pending (PE), paid(PA) or canceled (CA), EBANX sends a notification to your system through the Notification URL that you should set in your Dashboard. For more details on setting your notification URL, you can refer to the Settings Tab on your EBANX Dashboard.
EBANX signs every notification request using a private certificate and send the signature in the HTTP headers. The merchant can verify if the request really came from EBANX by validating the digital signature using our public certificate.
The available certificates and their fingerprints are shown on the table below:
Fingerprint Certificate 4ABAD89CF66B99998465470550EB15E3E271A246 Download EBANX will send the following headers in the notification request:
X-SignatureType: rsa,sha1X-SignatureFingerprint: 4ABAD89CF66B99998465470550EB15E3E271A246X-SignatureContent: xh5hstzZt5Rf5ihNzbfFfkmN89askd...DrHJAnzHgaf2vzA==Parameter Description X-SignatureType
The signing algorithm. EBANX will always use RSA/SHA1. X-SignatureFingerprint
The signature fingerprint. It indicates which certificate was used to sign the notification. X-SignatureContent
The signed payload, encoded as a Base64 string. The signature can be validated in PHP as follows:
$cert = file_get_contents('ebanx-notifications-public.pem');$data = file_get_contents("php://input");$signature = base64_decode($_SERVER['HTTP_X_SIGNATURE_CONTENT']);// http://php.net/manual/en/function.openssl-verify.php$result = openssl_verify($data, $signature, $cert);if ($result === 1){echo "OK, signature is correct.";}else{echo "ERROR, the signature is incorrect.";}Get the payout hash codes from the notification
The notification will contain the following parameters:
Parameter Description operation
The value returned give the updated operation in payout. notification_type
Event that triggered the notification. Always returns update. hash_code
The uid hash identifing the payout. And
operation
can have the following values:payout_status_open
: The payout status has been created;payout_status_committed
: The payout status has changed from OP(Open) to CM(Committed);payout_status_processing
: The payout status has changed from CM(Committed) to PE(Pending);payout_status_awaiting_documents
: The payout status has changed from PE(Pending) to AD(Awaiting Documents);payout_status_awaiting_payment
: The payout status has changed from PE(Pending), or AD(Awaiting Documents), to AW(Awaiting Payment);payout_status_paid
: The payout status has changed from AD(Awaiting Documents), or AW(Awaiting Payment) to PA(Paid);payout_status_canceled
: The payout status has changed from OP(Open), or CM(Committed), or PE(Pending), or AD(Awaiting Documents), or AW(Awaiting Payment) to CA(Cancelled);payout_status_reverted
: The payout status hs changed from PA(Paid) to RE(Reverted);
Here's a sample of a notification:
operation=payout_status_paid¬ification_type=update&hash_codes=075191f535a332a29bef85b3b94a09d54b621b94Consult a payout using the /ws/payout/retrieve end-point
To consult a payout, you can follow the documentation in Consult a Payout page.
Let EBANX know you received our response
Reply the notification with an
HTTP 200
status. We suggest to print any message showing that you got the notification, indicating that the notification was successful.
Getting help
We hope this article was enlightening, but in case we’ve failed to take out your doubts you have the following options to keep on seeking for answers:
- If you’re not our partner yet and would like to know more about our prices and conditions please fill our this form and our commercial team will get in touch with you.
- In case you’re already our partner please get in touch with our support team at integration@ebanx.com.