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 direct 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. It is worth mentioning that after payment, there are three types of responses you can expect:
- The response on the return page (clarified in this step)
- The callback (clarified in the next step)
- The IPN (clarified in the next step)
The expected behavior of the above-mentioned responses will depend on the type of integration you are using, as shown below:
To get the best out of this article, make sure you have a full understanding of the following solution articles:
As it relies on the Hosted Payment Page integration type, so after redirecting the cardholder/customer to the payment page to fill in the payment page requirements and card authentication, the customer will be redirected to the return URL (ONLY if the return parameter has been set) along with an HTTP POST response to the same URL with the brief transaction information.
To know more please check our The Return URL Response solution article.
- The return parameter MUST be set.
- The return URL MUST be HTTPS.
⌂ To get familiar with the whole process and the other steps, kindly navigate to our "The PT2 API Endpoints Integration Manual" solution article.
⇦ And to get familiar with the rest of the steps regarding the previuos step "Step 4 - Accepting the payment" kindly click here.
⇨ And to navigate to the next step in the integration process "Step 6 - Handle the post payment responses" kindly click here.