Skip to main content

Reterive Report List

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.

Reports is a powerful feature designed to help merchants monitor and analyze their transaction flow. By using Reports, merchants gain the ability to access bulk transaction data in detail, making it easier to track payment activity, review order histories, and ensure smooth business operations.

After setting up the report details in the Dashboard, you can use the Reports API to retrieve all available reports, with a maximum of 30 latest reports. These will include the initial details such as report dates and type (e.g., weekly, monthly, etc.).

Let’s go through the following sections to learn how to do this.


In this tutorial, we will rely on the PayTabs Get All Reports Transaction API Endpoint, mentioned on the PayTabs API endpoints postman collection, which you can access fromhere. he endpoint will need to be accessed with the mentioned HTTP request via the below URL endpoint:

GET{{domain}}/report/[PROFILE_ID]/list
Be Aware Of

Please note that not using the proper endpoint URL {domain} will lead to authentication issues within your responses. To find the your proper domain you can read ourWhat is my (Region)/(endpoint URL)?tutorial article.

https://secure.paytabs.sa/report/[PROFILE_ID]/list

The Minimum Required Parameters

To initiate a get list of report request, there are minimum required parameters that need to be passed with valid information. The specification of these required parameters is clarified below according to the query type:

In the GET report List, we simply use a GET request passing only the Profile_id as a param in the endpoint URL to get the List of Reports. As shown in the below sample request.

ParameterData TypeMinMaxRequired
profile_id
INT

STRING
Accept only valid profile number.
The merchant Profile ID you can get from your PayTabs dashboard. For more information please check our How to get your account information from PT Dashboard? solution article. To know more about this parameter please click here.
{
"profile_id": 987654
}

Sample Request/Response Payloads

As mention before, for get request, you only need to pass the Profile_id and the server key to API key.

Alt text

Expected Flow Behavior

To Reterive the Report List successfully, find the following steps for clear guidance:

  1. First of all, this endpoint is a management endpoint. You need to ensure that you have already created an active layout from the merchant dashboard, referring back to Step 1: Understanding Workflow and Prerequisites.

  2. The reports will begin generating automatically in the Reports menu and will appear as shown below:


    Alt text

  3. Once generation begins, you can start using this endpoint with your profile ID, following the steps outlined here: Minimum Required Parameters.


  4. In the successful case, you will receive a report list as expected, similar to the response payload shownhere.

  5. However, if an error occurs during report generation or if you created a monthly layout that has not yet been generated, you will see the following:


    {
    "profileID": 136935,
    "reportCount": 0
    }

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.