> For the complete documentation index, see [llms.txt](https://vitawallet.gitbook.io/vita-business-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vitawallet.gitbook.io/vita-business-documentation/english/gestion-de-transacciones/listar-transacciones.md).

# Transactions list

## Transactions List

<mark style="color:blue;">`GET`</mark> `api.vitawallet.io/api/businesses/transactions?page=:page&count=:count`

This method allows you to list all the transactions of a business, supports paging and filters.

#### Path Parameters

| Name               | Type   | Description                                                                                                                                                                                                                                                                |
| ------------------ | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| sender\_wallet     | string | Filter transactions by sending wallet **UUID**.                                                                                                                                                                                                                            |
| recipient\_wallet  | string | Filter transactions by recipient wallet **UUID**.                                                                                                                                                                                                                          |
| status             | string | <p>Filter transactions by status<br><br>Allowed status<br><strong><code>started</code></strong><br><strong><code>completed</code></strong><br><strong><code>pending</code></strong><br><strong><code>denied</code></strong><br><strong><code>processed</code></strong></p> |
| transactions\_type | string | Filter transactions by type                                                                                                                                                                                                                                                |
| currency           | string | <p>Filter transactions by currency<br><br>Allowed currencies:<br><strong><code>clp</code></strong><code> #(chilean pesos)</code></p>                                                                                                                                       |
| count              | number | <p>Total transactions<br><strong>default: 20</strong></p>                                                                                                                                                                                                                  |
| page               | number | Page number                                                                                                                                                                                                                                                                |

{% tabs %}
{% tab title="200 OK Request" %}

```
{
    "transactions": [
        {
            "id": "1",
            "type": "business_transaction",
            "attributes": {
                "recipient_wallet": {
                    "token": "i789iuji78oi78",
                    "uuid": "0748559-2e50-43f1-b4c0-0196de0295db",
                    "balances": {
                        "clp": 12000
                    },
                    "is_master": true,
                    "created_at": "2020-01-15T20:37:17.926Z"
                },
                "sender_wallet": null,
                "status": "completed",
                "order": "12345678901010000121234",
                "currency": "clp",
                "category": "recharge",
                "amount": "12000.0",
                "total": "12000.0",
                "fee_value": "0.0",
                "total_fee": "0.0",
                "created_at": "2020-03-24T20:37:17.926Z"
            }
        },
        {
            "id": "2",
            "type": "business_transaction",
            "attributes": {
                "recipient_wallet": {
                    "token": "iops87eopss478oios",
                    "uuid": "023d6e20-2e50-43f1-b4c0-0196de0295db",
                    "balances": {
                        "clp": 20000
                    },
                    "is_master": false,
                    "created_at": "2020-02-05T20:37:17.926Z"
                },
                "sender_wallet": null,
                "status": "completed",
                "order": "123456789010100001212347",
                "currency": "clp",
                "category": "recharge",
                "amount": "20000.0",
                "total": "20000.0",
                "fee_value": "0.0",
                "total_fee": "0.0",
                "created_at": "2020-03-24T20:44:32.994Z"
            }
        }
    ],
    "total": 2,
    "count": 20
}
```

{% endtab %}
{% endtabs %}

### SDK

{% tabs %}
{% tab title="Node" %}
Note that the **get** method can take an optional parameter, which helps identify the page number you want to get and the number of items.

```javascript
import Business from 'vita-business-node';

try {
    const transactions = await Business.transactions().get({page, count});
} catch {}
```

{% endtab %}
{% endtabs %}

## Get Transaction

<mark style="color:blue;">`GET`</mark> `api.vitawallet.io/api/businesses/transactions/:id`

This method allows you to obtain the information of a transaction by its id.

#### Path Parameters

| Name | Type   | Description    |
| ---- | ------ | -------------- |
| id   | string | Transaction id |

{% tabs %}
{% tab title="200 OK Request" %}

```
{
    "transaction": {
        "id": "1",
        "type": "business_transaction",
        "attributes": {
            "recipient_wallet": {
                "token": "i789iuji78oi78",
                "uuid": "0748559-2e50-43f1-b4c0-0196de0295db",
                "balances": {
                    "clp": 12000
                },
                "is_master": true,
                "created_at": "2020-01-15T20:37:17.926Z"
            },
            "sender_wallet": null,
            "status": "completed",
            "order": "12345678901010000121234",
            "currency": "clp",
            "category": "recharge",
            "amount": "12000.0",
            "total": "12000.0",
            "fee_value": "0.0",
            "total_fee": "0.0",
            "created_at": "2020-03-24T20:37:17.926Z"
        }
    }
}
```

{% endtab %}
{% endtabs %}

### SDK

{% tabs %}
{% tab title="Node" %}
Note that the **transactions** module can receive the id of the transaction to search for.

**get** method hanldes the request to Vita Business services.

```javascript
import Business from 'vita-business-node';

try {
    const transactions = await Business.transactions(id).get();
} catch {}
```

{% endtab %}
{% endtabs %}
