---
title: "Generate virtual IBAN"
method: POST
path: "/pty/account/v1/accounts/{account_id}/iban"
tags: ["Ledger API - Accounts"]
---

# Generate virtual IBAN

`POST /pty/account/v1/accounts/{account_id}/iban`

## Request

- Base URL: `https://api.uat.paymentology.com`
- URL: `https://api.uat.paymentology.com/pty/account/v1/accounts/{account_id}/iban`
- Auth: HTTP bearer

<ul>
<li class="docBullet">Generates a virtual IBAN for an account using the rules defined for the client.</li>
<li class="docBullet">Currently supports South Africa (ZA) only.</li>
</ul>

## Path parameters

- `account_id` integer, required

## Request body

- LedgerGenerateIbanRequest
  - `country` 'ZA', required: ISO 3166-1 alpha-2 country code.
  - `api_call_unique_identifier` string: Optional unique identifier for correlating or deduplicating this API request. When provided, it is propagated as a correlation ID in downstream events.
  - `account_number` string: Domestic bank account number (7 to 11 digits, optional).

## Response `200`

Account number generated, or the existing one returned if the account already has one.

- LedgerGenerateIbanResponse
  - `account_number` string, required: Generated account number identifier (7 to 11 digits).
  - `branch_code` string, required: Branch code of the bank.
  - `bank_name` string, required: Name of the bank.

## Other responses

- `400`: Invalid request, invalid `account_number`, or account number generation is not configured for the client.
- `401`: Missing or invalid access token. Empty body.
- `403`: Access token rejected by the API gateway (for example, expired).
- `404`: The account was not found.
- `409`: `DUPLICATE_ACCOUNT_NUMBER`: the requested `account_number` is already in use.
- `500`: Unexpected error.

---

[API](https://skmtc.dev/paymentology/apis/ledger-api.md) - [All operations](https://skmtc.dev/paymentology/apis/ledger-api/llms.txt) - [OpenAPI document](https://skmtc.dev/paymentology/apis/ledger-api/revisions/a5700c501bee?raw)
