> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve Payout Statements

> POST to retrieve a paginated list of payout transactions by date range. Filter by status or virtual account and use last_ref_id for cursor pagination.

Use this endpoint to retrieve a paginated list of payout transactions for your account. Filter results by date range, transaction status, or a specific virtual account, and use cursor-based pagination to walk through large result sets.

## Headers

**x-api-key** `string` *required*

Your secret API key.

**Content-Type** `string` *required*

Must be `application/json`.

**X-Real-IP** `string` *required*

Your whitelisted server IP address.

## Request Body Example

```json theme={"dark"}
{
  "from_date": "01-01-2026",
  "to_date": "31-01-2026",
  "limit": 100
}
```

## Request Parameters

**from\_date** `string` *required*

Start date of the reporting period in `DD-MM-YYYY` format (e.g., `"01-01-2026"`).

**to\_date** `string` *required*

End date of the reporting period in `DD-MM-YYYY` format (e.g., `"31-01-2026"`).

**limit** `integer`

Maximum number of records to return per page. Default: `100`. Maximum: `100`.

**status** `string`

Filter transactions by their status. Accepted values: `SUCCESS`, `INITIATED`, `FAILED`.

**last\_ref\_id** `string`

The `ref_id` of the last record returned in your previous response. Pass this value to fetch the next page of results (cursor-based pagination).

**va\_id** `string`

Virtual account ID. Pass this to scope the statement to transactions from a specific virtual account only.

## Sample Request

```sh Shell theme={"dark"}
curl --location 'https://api.bluswap.co/api/v1/merchants/fetch_transactions' \
  --header 'x-api-key: YOUR_SECRET_KEY' \
  --header 'Content-Type: application/json' \
  --header 'X-Real-IP: YOUR_WHITELISTED_IP' \
  --data '{
    "from_date": "01-01-2026",
    "to_date": "31-01-2026",
    "limit": 100
  }'
```

```js Node.js theme={"dark"}
const response = await fetch('https://api.bluswap.co/api/v1/merchants/fetch_transactions', {
  method: 'POST',
  headers: { 'x-api-key': '<YOUR_API_KEY>', 'Content-Type': 'application/json', 'X-Real-IP': '<YOUR_WHITELISTED_IP>' },
  body: JSON.stringify({ from_date: '01-01-2026', to_date: '31-01-2026', limit: 100 })
});
console.log(await response.json());
```

```python Python theme={"dark"}
import requests

response = requests.post(
    "https://api.bluswap.co/api/v1/merchants/fetch_transactions",
    headers={"x-api-key": "<YOUR_API_KEY>", "X-Real-IP": "<YOUR_WHITELISTED_IP>"},
    json={"from_date": "01-01-2026", "to_date": "31-01-2026", "limit": 100},
)
print(response.json())
```

```java Java theme={"dark"}
var body = "{\"from_date\":\"01-01-2026\",\"to_date\":\"31-01-2026\",\"limit\":100}";
var request = java.net.http.HttpRequest.newBuilder(java.net.URI.create("https://api.bluswap.co/api/v1/merchants/fetch_transactions")).headers("x-api-key", "<YOUR_API_KEY>", "Content-Type", "application/json", "X-Real-IP", "<YOUR_WHITELISTED_IP>").POST(java.net.http.HttpRequest.BodyPublishers.ofString(body)).build();
var response = java.net.http.HttpClient.newHttpClient().send(request, java.net.http.HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

```go Go theme={"dark"}
package main
import ("net/http"; "strings")
func main() {
payload := strings.NewReader(`{"from_date":"01-01-2026","to_date":"31-01-2026","limit":100}`)
request, _ := http.NewRequest(http.MethodPost, "https://api.bluswap.co/api/v1/merchants/fetch_transactions", payload)
request.Header.Set("x-api-key", "<YOUR_API_KEY>")
request.Header.Set("Content-Type", "application/json")
request.Header.Set("X-Real-IP", "<YOUR_WHITELISTED_IP>")
response, _ := http.DefaultClient.Do(request)
defer response.Body.Close()
}
```

```php PHP theme={"dark"}
<?php
$curl = curl_init('https://api.bluswap.co/api/v1/merchants/fetch_transactions');
curl_setopt_array($curl, [CURLOPT_POST => true, CURLOPT_HTTPHEADER => ['x-api-key: <YOUR_API_KEY>', 'Content-Type: application/json', 'X-Real-IP: <YOUR_WHITELISTED_IP>'], CURLOPT_POSTFIELDS => json_encode(['from_date' => '01-01-2026', 'to_date' => '31-01-2026', 'limit' => 100]), CURLOPT_RETURNTRANSFER => true]);
echo curl_exec($curl);
curl_close($curl);
```

```ruby Ruby theme={"dark"}
require "json"
require "net/http"

uri = URI("https://api.bluswap.co/api/v1/merchants/fetch_transactions")
request = Net::HTTP::Post.new(uri, {"x-api-key" => "<YOUR_API_KEY>", "Content-Type" => "application/json", "X-Real-IP" => "<YOUR_WHITELISTED_IP>"})
request.body = {from_date: "01-01-2026", to_date: "31-01-2026", limit: 100}.to_json
puts Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request).body }
```

## Sample Response

```json theme={"dark"}
{
    "status": "Success",
    "status_code": 200,
    "message": "Transactions fetched successfully",
    "detail": null,
    "data": {
        "transactions": [
            {
                "bluswap_transaction_id": "0865dd12-xxxx-xxxx-xxxx-33fef3419462",
                "merchant_id": "f37ddc09-xxxx-xxxx-xxxx-8d0c58be27e6",
                "ref_id": "826750592142671872",
                "transaction_type": "PAYOUT",
                "utr": null,
                "amount": "39",
                "status": "FAILED",
                "closing_balance": null,
                "gst": null,
                "charge": null,
                "created_at": "2026-03-31T15:01:41.560633",
                "updated_at": "2026-03-31T15:02:08.218685",
                "account_number": "************1719",
                "ifsc": "AUBL0002556",
                "beneficiary_name": "R**** M******* S******",
                "account_holder_name": "R**** M******* S******",
                "mode": "IMPS",
                "status_description": "Payout processed"
            },
            {
                "bluswap_transaction_id": "5cbffd2b-xxxx-xxxx-xxxx-9a0cd55a2049",
                "merchant_id": "f37ddc09-xxxx-xxxx-xxxx-8d0c58be27e6",
                "ref_id": "826750525545512960",
                "transaction_type": "PAYOUT",
                "utr": null,
                "amount": "20",
                "status": "FAILED",
                "closing_balance": null,
                "gst": null,
                "charge": null,
                "created_at": "2026-03-31T15:01:25.696647",
                "updated_at": "2026-03-31T15:02:04.564444",
                "account_number": "************1719",
                "ifsc": "AUBL0002556",
                "beneficiary_name": "R**** M******* S******",
                "account_holder_name": "R**** M******* S******",
                "mode": "IMPS",
                "status_description": "Payout processed"
            }
        ],
        "pagination": {
            "has_more": true,
            "last_ref_id": "826750525545512960"
        }
    }
}
```

## Pagination

> [!NOTE]
>
> When `pagination.has_more` is `true`, more records are available. Pass the `pagination.last_ref_id` value as `last_ref_id` in your next request to fetch the subsequent page of results.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.