Модуль интеграции Kapital Bank-а с Jey ERP
Go to file
Ali eb7bd51f1d feat(api): migrate BIRBank integration to new v2 portal API
The bank rewrote its B2B API. Auth (login/refresh) is unchanged; everything
else moved to /b2b/<service>/portal/v{N}/... with a new response shape
(HTTP status codes + direct JSON instead of the responseData/response.code
envelope). Migrated all flows and verified against the live API.

Import:
- accounts → /b2b/accounts/portal/v1, cards → /b2b/cards/portal/v1
- account statement → /b2b/account/portal/v3/statements (top-level statementList)
- card statement → /b2b/cards/portal/v1/statements (accountNo+panLast4, paginated)
- ISO date parsing for trnDt; robust card date parsing; pagination safety cap

Bank dictionary:
- sync_bank_codes seeds from /banks?iban= per account; Bank Code gains bank_id + bic_code
- beneficiary bank/branch id resolved live from IBAN at send time

Outbound payments (rewritten):
- send → national-currency/internal (Kapital) or /inland (other banks) with
  nested payer/payee, payee.bank.id, name, tin; response {id, processKey}
- status → GET /transfers/portal/v1/{id}, mapped from frontState
- cancel → PUT /transfers/portal/v1/{id}/reject (mandatory comment)
- Kapital Bank Payment reworked: transfer_no/transfer_id/process_key/front_state
- VÖEN sourced from party (Bank Account has none); required for inland
- AZN-only guard on currency and sender account

Client/UX:
- bank error details (errors[]) surfaced via extract_error_message
- cancel dialogs show real errors instead of "Unknown error"

Security:
- Kapital Bank Login password: Data → encrypted Password field + migration patch

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 16:02:26 +00:00
birbank_docs feat: add outbound payment flow via Kapital Bank API 2026-03-26 19:44:05 +04:00
kapital_bank feat(api): migrate BIRBank integration to new v2 portal API 2026-06-22 16:02:26 +00:00
.editorconfig feat: Initialize App 2026-02-20 14:13:47 +04:00
.eslintrc feat: Initialize App 2026-02-20 14:13:47 +04:00
.gitignore feat: Initialize App 2026-02-20 14:13:47 +04:00
.pre-commit-config.yaml feat: Initialize App 2026-02-20 14:13:47 +04:00
CLAUDE.md chore: use native Azərbaycan spelling in user-facing strings 2026-05-14 10:56:54 +00:00
README.md feat: Initialize App 2026-02-20 14:13:47 +04:00
api_endpoints.txt added kapital bank settings and app rework 2026-02-25 22:07:07 +04:00
license.txt feat: Initialize App 2026-02-20 14:13:47 +04:00
pyproject.toml feat: Initialize App 2026-02-20 14:13:47 +04:00
www.kapitalbank.az_Archive [26-03-12 17-06-17].har added mapping without party 2026-03-13 17:20:08 +04:00

README.md

Kapital Bank

Kapital Bank Integration

Installation

You can install this app using the bench CLI:

cd $PATH_TO_YOUR_BENCH
bench get-app $URL_OF_THIS_REPO --branch main
bench install-app kapital_bank

Contributing

This app uses pre-commit for code formatting and linting. Please install pre-commit and enable it for this repository:

cd apps/kapital_bank
pre-commit install

Pre-commit is configured to use the following tools for checking and formatting your code:

  • ruff
  • eslint
  • prettier
  • pyupgrade

License

unlicense