# Get all transactions

### URI

&#x20;<mark style="color:green;background-color:green;">**GET**</mark>&#x20;

{% code overflow="wrap" %}

```
https://api.tryduplo.com/v1/wallets/transactions?page=1&limit=10&wallet_ref=&transaction_ref=&start_date=&end_date=&channel=&type=&status=&amount=&business_id=
```

{% endcode %}

### Parameters

#### Header

<table data-header-hidden><thead><tr><th width="536"></th><th></th></tr></thead><tbody><tr><td><strong>Authorization</strong><br><code>string</code></td><td>set value to <code>Bearer SECRET_KEY</code></td></tr></tbody></table>

#### Query Param

<table data-header-hidden><thead><tr><th width="260"></th><th></th></tr></thead><tbody><tr><td><strong>wallet_ref</strong><br><code>string</code></td><td>Wallet reference</td></tr><tr><td><strong>transaction_ref</strong><br><code>string</code></td><td>Transaction reference</td></tr><tr><td><strong>start_date</strong><br><code>string</code> </td><td>Specifies a start date range you wish to pull a list transactions from</td></tr><tr><td><strong>end_date</strong><br><code>string</code></td><td>Specifiy an end date ragne you wish to pull a list of teansactions from</td></tr><tr><td><strong>channel</strong><br><code>string</code></td><td>Transaction channel. <em>options include <code>in-system</code> or <code>nip</code></em></td></tr><tr><td><strong>type</strong><br><code>string</code></td><td>Transaction type. <em>options include <code>debit</code> or <code>credit</code></em></td></tr><tr><td><strong>status</strong><br><code>string</code></td><td>Transaction status. <em>options include <code>failed</code> or <code>successful</code></em></td></tr><tr><td><strong>amount</strong><br><code>string</code></td><td>Transaction amount</td></tr><tr><td><strong>business_id</strong><br><code>string</code> <mark style="color:red;"><code>required</code></mark></td><td>Merchant business ID</td></tr><tr><td><strong>page</strong><br><code>string</code></td><td>Specifies the current page in a list of paginated data, default is set to 1</td></tr><tr><td><strong>limit</strong><br><code>string</code></td><td>Specifies the number of records per page of a paginated data, default is set to 50</td></tr><tr><td><strong>search_term</strong><br><code>string</code></td><td>Specifies a keyword to be used in filtering transactions.</td></tr></tbody></table>

### Sample request

{% tabs %}
{% tab title="cURL" %}
{% code overflow="wrap" %}

```bash
curl --location --request GET 'https://staging-api.tryduplo.com/v1/wallets/transactions?page=1&limit=10&wallet_ref=&transaction_ref=&start_date=&end_date=&channel=&type=&status=&amount=&business_id=&wallet_ref=' \
--header 'Authorization: Bearer SECRET_KEY'
```

{% endcode %}
{% endtab %}

{% tab title="Node" %}
{% code overflow="wrap" lineNumbers="true" %}

```javascript
var axios = require('axios');

var config = {
 method: 'get',
 url: 'https://staging-api.tryduplo.com/v1/wallets/transactions?page=1&limit=10&wallet_ref=&transaction_ref=&start_date=&end_date=&channel=&type=&status=&amount=&business_id=&wallet_ref=',
 headers: {
   'Authorization': 'Bearer SECRET_KEY'
 }
};

axios(config)
.then(function (response) {
 console.log(JSON.stringify(response.data));
})
.catch(function (error) {
 console.log(error);
});
```

{% endcode %}
{% endtab %}

{% tab title="PHP" %}
{% code overflow="wrap" lineNumbers="true" %}

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
 CURLOPT_URL => 'https://staging-api.tryduplo.com/v1/wallets/transactions?page=1&limit=10&wallet_ref=&transaction_ref=&start_date=&end_date=&channel=&type=&status=&amount=&business_id=&wallet_ref=',
 CURLOPT_RETURNTRANSFER => true,
 CURLOPT_ENCODING => '',
 CURLOPT_MAXREDIRS => 10,
 CURLOPT_TIMEOUT => 0,
 CURLOPT_FOLLOWLOCATION => true,
 CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
 CURLOPT_CUSTOMREQUEST => 'GET',
 CURLOPT_HTTPHEADER => array(
   'Authorization: Bearer SECRET_KEY'
 ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Duplo Response

```json
{
   "data": {
       "transactions": [
            {
               "receiver_details": {
                   "bank_name": "Access Bank",
                   "account_number": "0694002924",
                   "account_name": "DAVID DANIEL IGBIGBI"
               },
               "currency": "NGN",
               "amount": 100,
               "description": "play money for test",
               "business_id": "8ed10fcc-1e1c-4ad1-9ed8-e870d6543349",
               "status": "successful",
               "provider_ref_id": "",
               "channel": "nip",
               "type": "debit",
               "vat": null,
               "fee_amount": 0,
               "account_ref": "",
               "transaction_ref": "dp_trans_a5ac0103e83929dacbfd5411542dac33",
               "wallet_ref": "wal_eV9nNyLc54oO",
               "settled_amount": 100,
               "date": "2022-08-22T19:59:30.300Z",
               "new_balance": 13500,
               "category": "bank_transfer",
               "multiple_source_details": []

           }
       ],
       "meta": {
           "page": 1,
           "limit": 50,
           "previousPage": false,
           "nextPage": false,
           "pageCount": 1,
           "total": 1
       }
   },
   "errors": {},
   "message": "Transactions retrieved successfully"
}
```
