Throughout its entire roadmap, Your FawryPay transactions shall experience several status updates. Depending on the specific nature of your core business, the status of your clients’ transactions can range from created, paid, cancelled, expired, shipped to delivered. Whenever the status of one of your transactions has been altered, FawryPay will send an informative HTTP POST request to your preconfigured endpoint on your own application server with the current detailed status of your transaction. Note that your endpoint need to be set during your registration process as a merchant with FawryPay (Register as a merchant). You can optionally implement a service to receive this request so that you can avail the service to the customer or update your stock automatically. You will need to provide your endpoints (callback notification URL) for both development and production environments.
FawryPay Example HTTP POST request to the merchant callback URL
Assuming you have providedhttp://MerchantURL/merchatCallbakPage as your callback URL, FawryPay server to serve API V2 will send the follwoing HTTP POST request with the following body parameters whenever the status of your transaction has been altered:
HTTP POST Request Parameters
Detailed description of the parameters associated with FawryPay server to server notification API V2 are given in the table below.
||UUID generated Request id||c72827d084ea4b88949d91dd2db4996e|
||The reference number of this order in atFawry system which is displayed to the customer and used during the payment||9990076204|
||The reference number of this order at merchant's system.||9990076204|
||Customer Name.||FirstName LastName|
||Customer Cell Phone||01xxxxxxxxx|
||Customer email to which payment confirmation will be email@example.com|
||The Profile id for the customer in the merchant system||ACD23658|
||The amount value received from merchant to be paid by the customer, merchant can use it to verify that the customer pay the required amount to enable the service to the customer||350.50|
||The payment Amount without the fees.||780.75|
||The fees added by fawry for the order amount.||10.00|
||Shipping fees amount if applicable||5.50|
||The updated status of your transaction.||
New, PAID, CANCELED
DELIVERED, REFUNDED, EXPIRED
||The configured payment method for the merchant||PAYATFAWRY, CARD|
||The actual time for the payment if the Order Status is PAID||19-05-2020 11:45:23|
||The transaction number in the bank||96322541122558|
||Unique number registered in FawryPay system to keep track of the payment||369552233|
||The order expiry in hours for this order if the merchant need to set specific expiry for this order if not set we will use the configured expiry hour per merchant||3.5|
||A list of order items associated to the order||123456|
||Contains the error code in case of failure.||9965|
||Contains an error message describing the failure reason.||Wrong Signature|
||The SHA-256 digested for the following concatenated string fawryRefNumber + merchantRefNum + Payment amount(in two decimal format 10.00)+Order amount(in two decimal format 10.00)+Order Status + Payment method + Payment reference number ( if exist as in case of notification for order creation this element will be empty) + secureKey||
Expected Body Response
FawryPay check on the http response status so return empty response and in case of http response status 200 the call back will be marked as delivered else FawryPay will keep sending the HTTP request for a preconfigured number of retries.
Was this page helpful?