# Verify account data

Get receiver account data verification

## Verify account by account data

<mark style="color:orange;">`POST`</mark> `/api/receiver-account/verify`

**Headers**

| Name        | Value     |
| ----------- | --------- |
| `x-api-key` | `<token>` |
| `signature` | `<token>` |

**Body**

| Name                                              | Type   | Description                            |
| ------------------------------------------------- | ------ | -------------------------------------- |
| `subaccount_id`<mark style="color:red;">\*</mark> | string | Subaccount ID of receiver account.     |
| `account_data`<mark style="color:red;">\*</mark>  | object | Account data to retrieve account info. |

&#x20;<mark style="color:red;">\*</mark> is mandatory parameter

#### How Filtering Works

The `account_data` fields for verification match the fields used when creating receiver accounts. You can filter by any combination of these fields.

<table><thead><tr><th width="130.4921875">Approach</th><th width="306.57421875">Use Case</th><th>Example</th></tr></thead><tbody><tr><td>Partial match</td><td>Returns the first receiver account that matches</td><td><pre class="language-json"><code class="lang-json">{ 
    "bsb": "123456" 
}
</code></pre></td></tr><tr><td>Exact match</td><td>Returns the specific account matching all fields</td><td><pre class="language-json"><code class="lang-json">{ 
    "bsb": "123456", 
    "account_number": "123456789" 
}
</code></pre></td></tr></tbody></table>

Examples:

* Send only bsb → Returns first receiver account with that BSB
* Send only account\_number → Returns first receiver account with that account number
* Send both bsb + account\_number → Returns the exact matching account

#### Example body request

**Direct Entry (AUD)**

```json
  {           
    "subaccount_id": "3dc81811-8cdb-49c6-8f9e-9125ea4540b0",                                                                                                                                                           
    "account_data": {                                                                                                                                                    
      "bsb": "123456",                                                                                                                                                   
      "account_number": "123456789"                                                                                                                                      
    }                                                                                                                                                                    
  }   
```

| Field           | Text                           |
| --------------- | ------------------------------ |
| account\_number | Account number                 |
| bsb             | 6-digit Bank-State-Branch code |

**ACH (USD)**                                                                                                                                              &#x20;

```json
  {    
    "subaccount_id": "3dc81811-8cdb-49c6-8f9e-9125ea4540b0",                                                                                                                                                                  
    "account_data": {                                                                                                                                                    
      "account_number": "123456789",                                                                                                                                     
      "routing_number": "021000021",                                                                                                                                     
      "account_type": "checking"                                                                                                                                         
    }                                                                                                                                                                    
  } 
```

| Field           | Text                       |
| --------------- | -------------------------- |
| account\_number | Account number             |
| routing\_number | 9-digit ABA routing number |
| account\_type   | `checking` or `savings`    |

**EFT (CAD)**

```json
  {        
    "subaccount_id": "3dc81811-8cdb-49c6-8f9e-9125ea4540b0",                                                                                                                                                              
    "account_data": {                                                                                                                                                    
      "account_number": "123456119",                                                                                                                                     
      "routing_number": "011401533",                                                                                                                                     
      "account_type": "savings"                                                                                                                                          
    }                                                                                                                                                                    
  } 
```

| Field           | Text                                           |
| --------------- | ---------------------------------------------- |
| account\_number | Bank account number                            |
| routing\_number | 9-digit routing number (institution + transit) |
| account\_type   | `checking` or `savings`                        |

**SEPA (EUR)**&#x20;

```json
 {       
    "subaccount_id": "3dc81811-8cdb-49c6-8f9e-9125ea4540b0",                                                                                                                                                               
    "account_data": {                                                                                                                                                    
      "iban": "DE89370400440532013000",                                                                                                                                  
      "bic": "COBADEFFXXX"                                                                                                                                               
    }                                                                                                                                                                    
  }    
```

| Field | Text                              |
| ----- | --------------------------------- |
| iban  | International Bank Account Number |
| bic   | Bank Identifier Code (SWIFT)      |

**Direct Credit (NZD)**

```json
  {         
    "subaccount_id": "3dc81811-8cdb-49c6-8f9e-9125ea4540b0",                                                                                                                                                             
    "account_data": {                                                                                                                                                    
      "account_number": "12-3456-1234567-00"                                                                                                                             
    }                                                                                                                                                                    
  }   
```

| Field           | Text                                           |
| --------------- | ---------------------------------------------- |
| account\_number | NZ account number format: `BB-bbbb-AAAAAAA-SS` |

**Response**

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

```json
{
    "exists": true,
    "receiver_id": "b367730a-6837-43e9-9b19-af910f4b8000",
    "account_id": "cdad7781-4169-4129-940d-c15077a46e86",
    "account_data": {
        "bsb": "012 ***",
        "account_number": "111 ***"
    }
}
```

{% endtab %}

{% tab title="400" %}

```json
{
    "message": "Missing or invalid subaccount_id or account_data"
}
```

{% endtab %}
{% endtabs %}
