> For the complete documentation index, see [llms.txt](https://apidocs.akinon.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.akinon.com/commerce-openapis/admin/bank-accounts/create-a-bank-account.md).

# Create a bank account

Creates a new bank account.

`bank`, `slug`, `holder_name` and `iban` are required. The `iban` must not already belong to another account — including a soft-deleted one — otherwise the request is rejected with `bank_account_100`. The `slug` is unique across all accounts.

```json
{"openapi":"3.1.0","info":{"title":"Admin API","version":"1.0.0"},"tags":[{"name":"Bank Accounts","description":"Administrative endpoints for **bank accounts** — the bank transfer (money order / EFT) accounts a customer can pay into when paying by bank transfer. Each account belongs to a bank and is identified by its IBAN.\n\n## Core Capabilities\n\n**1. Listing & Filtering**\n* Retrieve a paginated list of bank accounts, including inactive (soft-deleted) ones.\n* Filter by identifier, bank, and IBAN, each an exact match.\n\n**2. Account Lifecycle Management**\n* Create a bank account, fully or partially update it, and deactivate it.\n* The IBAN is unique across all accounts; an account whose IBAN already belongs to another account is rejected.\n\n## Deletion Semantics\n\nDeleting a bank account is a **soft delete**: the record is not removed, its `is_active` flag is set to `false` instead. A soft-deleted account keeps its IBAN, so the IBAN stays reserved and cannot be reused by a new account. The list endpoint still returns inactive accounts; filter on `is_active` at the client when only active accounts are wanted.\n\n## Error Codes\n\nRequests that are well-formed but conflict with a business rule are answered with `406 Not Acceptable` and carry the following code.\n\n| Code | Meaning |\n|------|---------|\n| `bank_account_100` | An account with the given IBAN already exists. Raised on create and on update. |\n\n## Dynamic Settings & Environment Variables\n\nNo dynamic settings (`dj_dynamic_settings`) are read by these endpoints. The dynamic settings registered by the payments module (`THREE_D_SECURE_ENABLED`, `THREE_D_SECURE_RULES`, `INSTALLMENT_FILTERS`, `LOYALTY_MONEY_ENABLED`, `APPLE_PAY_DOMAIN_ASSOCIATION`, `INSTALLMENT_PROVIDERS`, `SUBSCRIPTION_PRODUCT_ATTRIBUTE_KEY`) govern card payments, installments and related storefront flows; none of them affects the bank account endpoints.\n\n**Environment variables:** No environment variables are read directly by these endpoints."}],"servers":[{"description":"Omnitron Remote Proxy (external access — recommended)","url":"https://{omnitron_url}/api/v1/remote/{channel_id}","variables":{"omnitron_url":{"default":"sandbox.akinon.com","description":"Omnitron server URL (e.g., {omnitron.akinon.com})"},"channel_id":{"default":"1","description":"The channel identifier the remote request is routed through"}}},{"description":"Commerce API Server (internal / direct access only)","url":"https://{commerce_url}/api/v1","variables":{"commerce_url":{"default":"sandbox.akinon.com","description":"Internal commerce server URL, reachable only from within the Omnitron network"}}}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Token credential sent in the Authorization header, in the form: `Token <your-token>`. Requires a staff (admin) account."}},"schemas":{"BankAccountRequest":{"type":"object","description":"The body of a bank account create or full update request.","required":["bank","slug","holder_name","iban"],"properties":{"bank":{"type":"integer","description":"The identifier of the bank the account belongs to."},"slug":{"type":"string","maxLength":255,"description":"The unique reference of the account."},"holder_name":{"type":"string","maxLength":255,"description":"The name of the account holder."},"iban":{"type":"string","maxLength":34,"description":"The IBAN of the account. Must not already belong to another account, including a soft-deleted one."},"is_active":{"type":"boolean","default":true,"description":"Whether the account is active. Defaults to `true` when omitted."},"sort_order":{"type":"integer","default":0,"description":"The position used to order accounts. Defaults to `0` when omitted."},"description":{"type":["string","null"],"maxLength":255,"description":"A free-text note."}}},"BankAccount":{"type":"object","description":"A bank transfer account.","properties":{"pk":{"type":"integer","readOnly":true,"description":"The unique identifier of the bank account."},"bank":{"type":"integer","description":"The identifier of the bank the account belongs to."},"slug":{"type":"string","maxLength":255,"description":"The unique reference of the account."},"holder_name":{"type":"string","maxLength":255,"description":"The name of the account holder."},"iban":{"type":"string","maxLength":34,"description":"The IBAN of the account. Unique across all accounts."},"is_active":{"type":"boolean","description":"Whether the account is active. A soft-deleted account has this set to `false`."},"sort_order":{"type":"integer","description":"The position used to order accounts."},"description":{"type":["string","null"],"maxLength":255,"description":"A free-text note, or `null` when none is stored."}}},"ValidationError":{"type":"object","description":"Returned when the request contains invalid or missing data. Errors are grouped by the field they apply to: each key is the name of a field from the request and its value is a list of one or more messages describing what is wrong with that field. Messages that do not belong to any single field are grouped under `non_field_errors`.","properties":{"non_field_errors":{"type":"array","description":"Error messages that apply to the request as a whole rather than to a specific field.","items":{"type":"string"}}},"additionalProperties":{"type":"array","description":"The list of error messages for the field named by the key.","items":{"type":"string"}}},"Error":{"type":"object","description":"An error response.","properties":{"detail":{"type":"string","description":"A human-readable description of the error."}},"additionalProperties":true},"BankAccountBusinessError":{"type":"object","description":"Returned when an account with the given IBAN already exists. The message names the IBAN, and a stable code identifies the rule that was violated.","properties":{"non_field_errors":{"type":"string","description":"A human-readable message describing the business rule that was violated."},"error_code":{"type":"string","description":"A stable code identifying the business rule violation. `bank_account_100` is the only code these endpoints raise."}},"additionalProperties":true}},"responses":{"ValidationError":{"description":"The request contains invalid or missing data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"Unauthorized":{"description":"Authentication credentials were not provided or are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The authenticated user does not have administrator privileges.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"BankAccountAlreadyExists":{"description":"The request is well-formed but an account with the given IBAN already exists (`bank_account_100`). Both create and update raise this when the IBAN would collide with another account, including a soft-deleted one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankAccountBusinessError"}}}}}},"paths":{"/bank_accounts/":{"post":{"tags":["Bank Accounts"],"operationId":"createBankAccount","summary":"Create a bank account","description":"Creates a new bank account.\n\n`bank`, `slug`, `holder_name` and `iban` are required. The `iban` must not already belong to another account — including a soft-deleted one — otherwise the request is rejected with `bank_account_100`. The `slug` is unique across all accounts.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankAccountRequest"}}}},"responses":{"201":{"description":"The created bank account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankAccount"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"406":{"$ref":"#/components/responses/BankAccountAlreadyExists"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://apidocs.akinon.com/commerce-openapis/admin/bank-accounts/create-a-bank-account.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
