> For the complete documentation index, see [llms.txt](https://docs.leanx.io/api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.leanx.io/api-docs/payout/payout-transaction-list.md).

# Payout Transaction List

The Payout List API endpoint facilitates efficient retrieval of detailed payout transaction information, empowering businesses to seamlessly integrate, automate, and manage outgoing payments. Gain insights into transaction status, amounts, and dates for enhanced financial control and reporting.<br>

{% hint style="warning" %}
The payout transaction list that is returned are unique per **API Auth token**. Using different **API Auth token** will returned a different transaction list.
{% endhint %}

## Authentication

LeanX uses **Auth Token** to authenticate in each request's header.

{% hint style="info" %}
**Auth Token** can be retrieved in your portal dashboard under **API** page.
{% endhint %}

**Request Header**

{% code overflow="wrap" %}

```json
{
    "auth-token": "LP-0D7C06DE-MM|7394e58e-edee-4c42-9ca5-bcbc449f1b9f|2141df4a3cb633d5ce8683bb0c55067e5caebfbe07390dde277dc455bcc95c91723a81b5e565c7c02d68fb84e396722563016bf99e576a4b8cdbe4423fbf226b"
}
```

{% endcode %}

## Getting the payout transaction list&#x20;

HTTP Method: <mark style="color:yellow;">POST</mark>

```
https://api.leanx.dev/api/v1/merchant/payout-transaction-list
```

**Request Query**

```
?skip=0&limit=10
```

#### Attribute

<table><thead><tr><th width="177">Property</th><th>Description</th></tr></thead><tbody><tr><td>skip<mark style="color:red;">*</mark></td><td>Skips a specified number of rows</td></tr><tr><td>limit<mark style="color:red;">*</mark></td><td>Limits the results to the number of rows</td></tr></tbody></table>

#### Request Body

```json
{
  "start_date": "01-02-2022",
  "end_date": "27-02-2023",
  "record_status": 1,
  "search": {
    "search_enable": false,
    "search_key": "WEB_PAYMENT",
    "search_column": "payment_mode"
  },
  "sort": {
    "parameter_name": "created_at",
    "sort_type": "desc"
  }
}
```

#### Attribute

{% hint style="danger" %}
Please ensure that the **`search_enable`** flag is set to **`false`** if  **`search_key`** is not provided to avoid errors.
{% endhint %}

<table><thead><tr><th width="238">Property</th><th width="129">Type</th><th>Description</th></tr></thead><tbody><tr><td>start_date<mark style="color:red;">*</mark></td><td>string</td><td>Start date of the transaction list. Kindly follow this format <code>DD-MM-YYYY</code></td></tr><tr><td>end_date<mark style="color:red;">*</mark></td><td>string</td><td>End date of the transaction list. Kindly follow this format <code>DD-MM-YYYY</code></td></tr><tr><td>record_status<mark style="color:red;">*</mark></td><td>number</td><td>Filter the result with record status <br>1 = active<br>2 = inactive</td></tr><tr><td>search<mark style="color:red;">*</mark></td><td></td><td>Search for keyword </td></tr><tr><td>- search_enable<mark style="color:red;">*</mark></td><td>Boolean</td><td>Enable or disable search function<br><code>true</code> or <code>false</code></td></tr><tr><td>- search_key<mark style="color:red;">*</mark></td><td>string</td><td>Keyword that you want to search for.</td></tr><tr><td>- search_column<mark style="color:red;">*</mark></td><td>string</td><td>Column name that you want to search in</td></tr><tr><td>sort<mark style="color:red;">*</mark></td><td></td><td>Sort the result</td></tr><tr><td>- parameter_name<mark style="color:red;">*</mark></td><td>string</td><td>Column name that you want to sort</td></tr><tr><td>- sort_type<mark style="color:red;">*</mark></td><td>string</td><td>Sorting direction <br>"<code>asc</code>" = Ascending<br>"<code>desc</code>" = Descending</td></tr></tbody></table>

#### Response

```json
{
  "response_code": 2000,
  "description": "SUCCESS",
  "app_version": "/api/v1",
  "talk_to_server_before": "2023-12-05T15:50:05.572298",
  "data": {
    "list": {
      "draw": 10,
      "record_total": 21,
      "record_filtered": 21,
      "data": [
        {
          "merchant_invoice_id": "VA-F04EC4-164712020277-PAYOUT",
          "id": 376,
          "payout_invoice_no": "PAYOUT-918E:164211-LEANX",
          "payout_account_number": "8011408168",
          "recipient_name": "TEST CUSTOMER WP2",
          "transaction_fee": 0.50,
          "account_id": 3,
          "record_status": 1,
          "updated_at": "2023-10-20T16:42:12",
          "switch_invoice_id": "VP1678085468bA52B",
          "transaction_invoice_no": "NO_DATA",
          "transaction_status": "PENDING",
          "value": 100.00,
          "created_at": "2023-10-20T16:42:12"
        },
        ..........
        {
          "merchant_invoice_id": "VA-F04EC4-164712020277-PAYOUT",
          "id": 197,
          "payout_invoice_no": "PAYOUT-86B0:220453-LEANX",
          "payout_account_number": "11212121112111",
          "recipient_name": "TEST CUSTOMER WP2",
          "transaction_fee": 0.50,
          "account_id": 3,
          "record_status": 1,
          "updated_at": "2023-07-06T22:05:03",
          "switch_invoice_id": "VP1678085468bA52B",
          "transaction_invoice_no": "PAYOUT1688652293ClAEbwWK",
          "transaction_status": "SUCCESS",
          "value": 36.00,
          "created_at": "2023-07-06T22:04:53"
        }
      ],
      "next_page_start": 10,
      "next_page_length": 10,
      "previous_page_start": 0,
      "previous_page_length": 10
    }
  },
  "breakdown_errors": null,
  "token": "18e0933d-6bc1-4808-9bc7-aad2bcd38686"
}
```
