# Retiros

La API de retiros nos permite transferir el balance de nuestros clientes a su cuenta bancaria

{% hint style="warning" %}
Para que el retiro sea valido, el cliente tiene que tener al menos ARS 50.000
{% endhint %}

## Retiros en moneda local

### \[PUT] <https://api.getamplify.app/receiver/:receiverId>

Endpoint para agregar la información bancaria de nuestro cliente

**Body**

```json
{
    "name": "Juan",
    "lastName": "Perez",
    "dob": "1990-01-30",
    "accountNumber": "000000XX0000XXXXXXXXXX", // CBU
    "identificationNumber": "20123456789", // CUIL | CUIT 
    "bankAccountNumber": "4020000-3 012-3",
    "bankName": "Galicia",
}
```

**Respuesta**

<pre class="language-json"><code class="lang-json"><strong>{
</strong>    "status": "ok",
}
</code></pre>

### \[POST] <https://api.getamplify.app/withdrawal>

Crea un nuevo retiro para un cliente especifico

{% hint style="warning" %}
Este endpoint necesita los siguientes headers para funcionar:

<pre class="language-json"><code class="lang-json"><strong>{
</strong>  "apiKey": "123xxx456",
  "clientId": "123xxx456",
}
</code></pre>

{% endhint %}

**Body**

```json
{
    "receiverId": "id-del-cliente"
}
```

**Respuesta**

```json
{
    "userId": "123...456",
    "amount": "123",
    "exchangeRate": "1000",
    "status": "PENDING",
    "testnet": false,
    "receiverId": "id-del-cliente",
    "created_at": "2024-01-01 12:00:24.677Z",
}
```

## Retiro en cripto

### \[POST] <https://api.getamplify.app/withdrawal/crypto>

Crea un nuevo retiro de criptomonedas para un cliente especifico.

{% hint style="warning" %}
Este endpoint necesita los siguientes headers para funcionar:

<pre class="language-json"><code class="lang-json"><strong>{
</strong>  "apiKey": "123xxx456",
  "clientId": "123xxx456",
}
</code></pre>

{% endhint %}

**Body**

```json
{
	 receiverId: "id-del-cliente"
	 address: "dirección-de-retiro"
	 chainId: "id-red-de-retiro"
	 currency: "USDT/USDC"
}
```

Respuesta

```json
{
    "amount": "123",
    "exchangeRate": "0",
    "status": "PENDING",
    "testnet": false,
    "receiverId": "id-del-cliente",
    "created_at": "2024-01-01 12:00:24.677Z"
}
```
