After a transaction process comes to end, you can easily depend on the mentioned methods to update your system with the transaction/payment status to proceed with your order business flow process, such as shipping the order once the payment is authenticated, unlocking the products locked quantities after the payment is failed and so.


In this article you will be going to know about:


What is Transaction Response?

The transaction response is the information you will receive from PayTabs after the transaction process comes to an end whether is it authorized, declined, canceled, etc.


1 - Return Response

What is the Return Response?

The return response is a POST response that is sent from the client browser (Cardholder) with the basic transaction information only after the payment came to an end (whether the customer cancels, paid, or failed to pay) and redirects the customer back to your system.


Return Payload Sample

acquirerMessage=
&acquirerRRN=
&cartId=cart_11111
&customerEmail=wajih%40domain.com
&respCode=G77803
&respMessage=Authorised
&respStatus=A
&token=
&tranRef=TST202860000xxxx

 

The "acquirerRPN", "respCode", ... will be different on your Live profiles because they are sent from the bank side. (Read more about Response Code and Response Status on the article "What is: Response_code vs the Response_status?")



If the return URL passed as HTTP (Not HTTPS) it will sent as GET response instead with empty payload



You will receive a "return" response if you supplied a return URL in the paymrnt request payload as shown below.



2 - Callback Response

What is the Callback Response?

The return response is a server-to-server  POST response that is sent (to pre-defined HTTPS) with full detailed transaction information only after the payment came to an end (whether the customer cancels, paid, or failed to pay).


Callback Response Sample

{
  "tran_ref": "TST202860000xxxxx",
   "cart_id": "cart_11111",
   "cart_description": "Description of the items",
   "cart_currency": "SAR",
   "cart_amount": "12.3",
   "customer_details": {
     "name": "wajih last",
     "email": "[email protected]",
     "phone": "0522222222",
     "street1": "address street",
     "city": "dubai",
     "state": "DU", 
     "country": "AE", 
     "ip": "92.98.175.138" 
   },
   "shipping_details": {
     "name": "wajih last1",
     "email": "[email protected]",
     "phone": "971555555555",
     "street1": "street2",
     "city": "dubai",  
     "state": "DU",  
     "country": "AE", 
     "ip": "92.98.175.138" 
   },
   "payment_result": {
     "response_status": "A",
     "response_code": "G77803",
     "response_message": "Authorised",
     "transaction_time": "2020-10-12T04:43:23Z"
   },
   "payment_info": {
     "card_type": "Credit",
     "card_scheme": "Visa",
     "payment_description": "4111 11## #### 1111"
   }


You will receive a "callback" response only if you supplied a callback URL in the paymrnt request payload as shown below.



3 - IPN Response


What is the IPN Response?

The IPN response is an instant payment notification response that will be sent to the pre-configured IPN listener (URL), only according to the cases/events that you configured the event type in (Sale, Auth, Refund, etc).

For more about what is the IPN, its different types, and how to configure a one, kindly check our "How to configure Instant payment notification (IPN)?" solution article

4 - SendGrid

What is the SendGrid?

SendGrid is a customer communication platform for transaction and marketing emails. In other words, a tool that allows you and your clients to receive emails about each transaction detail.


To know more about the SendGrid and how to configure it, kindly check our "How to integrate my Paytabs account with my SendGrid account?" solution article



5 - Query Transaction API Endpoint

What is the Query Transaction API endpoint?

The query transaction is an endpoint API that allows you to fetch its details, to know more about its status, type, etc. You can use this endpoint as it will return the details of the requested transaction.


Response Payload Sample

{
  "tran_ref": "TST202860000xxxxx",
   "cart_id": "cart_11111",
   "cart_description": "Description of the items",
   "cart_currency": "SAR",
   "cart_amount": "12.3",
   "customer_details": {
     "name": "wajih last",
     "email": "[email protected]",
     "phone": "0522222222",
     "street1": "address street",
     "city": "dubai",
     "state": "DU", 
     "country": "AE", 
     "ip": "92.98.175.138" 
   },
   "shipping_details": {
     "name": "wajih last1",
     "email": "[email protected]",
     "phone": "971555555555",
     "street1": "street2",
     "city": "dubai",  
     "state": "DU",  
     "country": "AE", 
     "ip": "92.98.175.138" 
   },
   "payment_result": {
     "response_status": "A",
     "response_code": "G77803",
     "response_message": "Authorised",
     "transaction_time": "2020-10-12T04:43:23Z"
   },
   "payment_info": {
     "card_type": "Credit",
     "card_scheme": "Visa",
     "payment_description": "4111 11## #### 1111"
   }


The "Query transaction API " response payload is same as the "callback" response one.



To know more about this endpoint and how to use it, kindly check our "Follow Up API endpoints" solution article.