Paytabs provides you with a collection of API endpoints which used to process all payments, regardless of if they are through either your own payment pages, the managed payment pages, or if you are using the hosted payment pages.
This article is dedicated to walking you through how to handle the payment response sent from PayTabs after the payment. Handling the response right will empower you to make sure to handle the user experience according to the payment status as well as and updating the order status in your database.
In this article, you will be going to know how to handle the payment response:
To get the best out of this article, it's highly recommended to check our Five ways of receiving transaction response solution article.
via The Return URL response
According to the used integration type flow clarified in Step 5 - Handle the payment response | Response Flow solution article, you will receive the below response payload.
Verify the Return Response
It's highly recommended to verify the Return response first. Verifying the received object is a mandatory step to ensure that the request source is Paytabs itself. To know how to perform this, kindly check our How to verify the response received from PayTabs? (Signature Verification) solution article.
However, we highly recommend you to NOT only rely on this response as it might be affected bu the customer behavior and to rely entirly on the post payment responses clarified in the next step.