> For the complete documentation index, see [llms.txt](https://api-comercio.gitbook.io/api-comercios/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api-comercio.gitbook.io/api-comercios/reference/api-reference/depositos.md).

# Depósitos

Consultá los depósitos que recibió tu comercio o los que aún están pendientes.

## Consultar depósitos

Recibidos:

<mark style="color:green;">`POST`</mark>  /deposits/paid/page/0

Pendientes:

<mark style="color:green;">`POST`</mark>  /deposits/pending/page/0

#### Headers

| Key          | Value            |
| ------------ | ---------------- |
| Content-Type | application/json |
| apikey       | su\_api\_key     |
| X-TRACE-ID   | uuidv4()         |
| X-VERSION    | 1                |

#### Request Body

```javascript
{}
```

**Response**&#x20;

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

```javascript
{
    "page": "number",
    "existMore": "boolean",
    "listTrx": [
        {
            "_id": "string",
            "amount": "number",
            "dateTime": "string",
            "currency": "string",
            "commission": {
                "name": "string",
                "value": "number"
            },
            "commissionAmount": "number",
            "commissionAndFinancialCostAmount": {
                "name": "string",
                "value": "number"
            },
            "commissionAndFinancialCostTaxAmount": {
                "name": "string",
                "value": "number"
            },
            "commissionTaxAmount": "number",
            "costPerInstallment": "number",
            "financialCostTaxAmount": "number",
            "withholdingTax": "number",
            "withholdingTaxAmount": "number",
            "total": "number",
            "state": "string",
            "toDeposit": "string"
        }
    ]
}

```

{% endtab %}

{% tab title="401 Unauthorized" %}

```javascript
// Si apikey no es enviado en el Headers: 
{"message":"Missing API key found in request"}

// Si apikey es enviada de forma errónea:
{"message":"Invalid API key in request"}

```

{% endtab %}

{% tab title="500 Internal Server Error" %}

```javascript
// Error de parámetros

{
   "status": 500,
   "message": "status 500",
   "timestamp": "2024-05-28T12:30:04Z"
}

```

{% endtab %}
{% endtabs %}

Aquí algunos ejemplos de peticiones:

{% tabs %}
{% tab title="cURL" %}

```
curl --location --request POST 'http://api-gwt.sipago.online/services/deposits/paid/page/0' \
--header 'apikey: su_api_key' \
--header 'X-TRACE-ID: uuidv4()' \
--header 'X-VERSION: 1' 
```

{% endtab %}

{% tab title="NodeJs - Axios" %}

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

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'http://gapi-gwt.sipago.online/services/deposits/paid/page/0',
  headers: { 
    'apikey': 'su_api_key', 
    'X-TRACE-ID': 'uuid'
  }
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

{% endtab %}

{% tab title="Python - Requests" %}

```python
import requests

url = "http://api-gwt.sipago.online/services/deposits/paid/page/0"

payload = {}
headers = {
  'apikey': 'su_api_key',
  'X-TRACE-ID': 'uuid'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

```

{% endtab %}
{% endtabs %}
