# Verify Bank Account

<table data-header-hidden><thead><tr><th width="74.8046875" align="center"></th><th></th></tr></thead><tbody><tr><td align="center"><mark style="color:blue;"><strong>POST</strong></mark> </td><td>https://api.sfox.com/v1/user/bank/verify</td></tr></tbody></table>

Verify micro-deposits sent to your bank account from sFOX.

***

For bank accounts linked manually ([Create Bank Account](https://docs.sfox.com/connect/rest-api/payments/create-bank-account)), sFOX uses micro-deposits to to verify the account.&#x20;

* sFOX will deposit two <$1 amounts  to the user's linked bank account. Micro-deposits expect to be be completed within 1-3 business days after linking the bank account. If the user has not received the deposits within 3 days, please contact **<support@sfox.com>**
* Collect these amounts from your end user and use the request below to verify.&#x20;

Until verification is completed the user's bank account will be in a "Pending Verification" status. Bank account status may be retrieved using a [Get Bank Account](https://docs.sfox.com/connect/rest-api/payments/get-bank-account) request.

## Request

{% hint style="info" %}
**Authentication:** This endpoint requires a [User Auth Token](https://docs.sfox.com/connect/rest-api/end-users/create-user-auth-token) for authentication. Requests using your Connect API Key will be rejected.
{% endhint %}

### Body Parameters

<table><thead><tr><th width="203">Name</th><th>Description</th></tr></thead><tbody><tr><td><code>verifyAmount1</code><br><mark style="color:red;">required</mark>, number</td><td>The value of the first micro-deposit.  Should be a number less than 1.</td></tr><tr><td><code>verifyAmount2</code><br><mark style="color:red;">required</mark>, number</td><td>The value of the second micro-deposit.  Should be a number less than 1.</td></tr></tbody></table>

### Example Requests

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

<pre class="language-shell"><code class="lang-shell">curl -X POST \
  -H 'Content-type: application/json' \
<strong>  -H "Authorization: Bearer ${USER_AUTH_TOKEN}" \
</strong>  --data '{ "verifyAmount1": ${AMOUNT_1}, "verifyAmount2": ${AMOUNT_2} }'  \
  'https://api.sfox.com/v1/user/bank/verify'
</code></pre>

{% endtab %}

{% tab title="NodeJS" %}

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

const data = JSON.stringify({
   amount1: ${AMOUNT_1},
   amount2: ${AMOUNT_2}
  })
  
const config = {
  method: 'post',
  url: 'https://api.sfox.com/v1/user/bank/verify',
  headers: {
    "Content-Type": "application/json",
    'Authorization': `Bearer ${process.env.USER_AUTH_TOKEN}`
  },
  data: data
}

axios(config)
  .then((response) => {
    console.log(response.status)
    console.log(response.data)
  })
  .catch(err => {
    console.error(err.response.status)
    console.error(err.response.data)
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
import os

data = requests.post(
  "https://api.sfox.com/v1/user/bank/verify",
  headers={
    "Authorization": f"Bearer {os.environ['USER_AUTH_TOKEN']}"
  },
  json={
    "amount1": ${AMOUNT_1},
    "amount2": ${AMOUNT_2}
  }
)
print(data.status_code)
print(data.json())
```

{% endtab %}
{% endtabs %}

## Response

### Response Fields

<table><thead><tr><th width="203">Field</th><th>Description</th></tr></thead><tbody><tr><td><code>success</code> <br>string</td><td>Whether verification succeeded. <br><em>Possible values:</em> <code>true</code>, <code>false</code></td></tr></tbody></table>

### Responses

<details>

<summary><mark style="color:green;">200</mark>: OK</summary>

The following is an example response body to successfully verifying micro-deposits:

```json
{
    "success": true
}
```

</details>

<details>

<summary><mark style="color:red;">400</mark>: Bad Request</summary>

{% code overflow="wrap" lineNumbers="true" %}

```json
// Exceeded maximum verification attempts. 
// Re-link a bank account by deleting the current bank account and creating a new bank account.
{
    "error": "You have exceeded the maximum attempts to verify your bank account. Please add your bank account again to restart verification."
}
```

{% endcode %}

</details>
