Skip to main content

Step 7 - Manage Transactions

PayTabs Mobile SDKs streamline the integration process with the PayTabs payment gateway by offering a pre-configured payment interface. This interface efficiently manages card data entry, billing and shipping information, and automatically supplements any missing details required to complete the transaction flow.

This article is dedicated to walking you through how to manage/control the already existing transactions (as a result of all of the previous steps), you can get the Query Transaction.

Note

Through out this article we will use the transaction types clarified in our What is the "tran_type" (transaction type)? solution article.

PayTabs Native Android SDK is designed to facilitate client-side payment initiation and processing. Hence, they do not support post-transaction operations such as refunds, voids, or captures. These actions involve sensitive financial operations and must be handled securely from the merchant side:

  • Through backend APIs integration
  • Or via the PayTabs Merchant Dashboard.

You can make Query Transaction, to fetch any transaction details. for any modification or reversal of existing transactions must be performed using one of the following methods:

  • PayTabs Dashboard: Use the dashboard interface to perform transaction actions such as Capture, Void, and Refund. For more details, kindly check our Transactions Menu Via Merchant Dashboard solution article.

  • API Endpoints: Integrate directly with our PT2 API to execute specific transaction types programmatically. For more details check please our manual HPP Manage Transactions.



The following transaction type are currently supported for managing transactions through PayTabs Native Android SDK:

Query Transaction:

If you have a transaction that you want to fetch its details and know more about its status, type, etc... you can use the method queryTransaction to get the details of the requested transaction. In this article, we walk you through how to do that.

  1. First, create PaymentSDKQueryConfiguration and fill it out with your credentials and transaction reference. To know more about what is the exact values that should be passed here, please check our Configuration Options & Parameters manual.


    val queryConfig = PaymentSDKQueryConfiguration(
    "ServerKey",
    "ClientKey",
    "Country ISO 2",
    "Profile Id",
    "Transaction Reference"
    )
  2. Only then you will be ready to start/initiate the query transaction by passing the PaymentSDKQueryConfiguration object along with the current CallbackPaymentInterface inherited activity/fragment instance -in which you will handle the payment response- to the queryTransaction function to get the transaction full details. To know more about this please check our Handle the payment response solution article.


    QuerySdkActivity.queryTransaction(
    this,
    queryConfig,
    this
    )
For the best practice

We highly recomment you to rely on the IPNs to get the status of your transactions (server-to-server integration).


We are glad to be always in help. We aim to serve you better each time. As such, please spare a minute to share feedback about your recent experience with PayTabs Developers , on Trustpilot, or Google Reviews.