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)


Below is the expected behavior of the above-mentioned responses on the Hosted Payment Page:



 

Hosted Payment Page


 Considerations


To get the best out of this article, make sure you have a full understanding of the following solution articles:


The Flow


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.


  Requirements


  • 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.