# SEPA

Create a new receiver account for receiver

## Create a New SEPA Receiver Account

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

**Headers**

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

**Body**

| Name                                            | Type   | Description                                                          |
| ----------------------------------------------- | ------ | -------------------------------------------------------------------- |
| `receiver_id`<mark style="color:red;">\*</mark> | string | Receiver ID of receiver account.                                     |
| `iban`<mark style="color:red;">\*</mark>        | string | IBAN of receiver account.                                            |
| `bic`                                           | string | BIC/SWIFT Code of receiver account.                                  |
| `bank_country_code`                             | string | 2-letter ISO country code of the bank (e.g., "DE", "FR", "GB", "IE") |
| `bank_name`                                     | string | Name of the receiver's bank                                          |

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

#### Example body request

**Scenario 1: IBAN only**

```json
{
    "receiver_id": "a2bb66db-7067-44a2-8067-1393b682bc75",
    "iban": "DE89370400440532013000",
}
```

When only `iban` is provided, the system automatically extracts and populates `bic`, `bank_country_code`, and `bank_name` from the IBAN.

**Scenario 2: IBAN with any optional parameters**

```json
{
    "receiver_id": "a2bb66db-7067-44a2-8067-1393b682bc75",
    "iban": "DE89370400440532013000",
    "bic": "DEUTDEFFXXX",
    "bank_country_code": "DE",
    "bank_name": "Deutsche Bank"
}
```

When optional parameters are provided, the system uses the supplied values directly and skips auto-fill.

**Response**

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

```json
{
    "message": "Receiver account created successfully",
    "payload": {
        "receiver_account_id": "c7ded40b-1524-49f4-ae3f-ee974cbe6fdd",
        "receiver_id": "a2bb66db-7067-44a2-8067-1393b682bc75",
        "status": "pending",
        "confirm_status": "unconfirmed"
    }
}
```

{% endtab %}

{% tab title="400" %}

```json
{
    "message": "There was an error while creating a receiver account",
    "error": [
        {
            "code": "REAC211",
            "message": "Receiver ID is not valid"
        }
    ]
}
```

{% endtab %}
{% endtabs %}
