Project

General

Profile

Actions

Feature #1259

open
RA

Live Wise API pull — bank account as source of truth

Feature #1259: Live Wise API pull — bank account as source of truth

Added by Redmine Admin about 1 month ago. Updated about 1 month ago.

Status:
In development
Priority:
Normal
Assignee:
-
Start date:
06/29/2026
Due date:
% Done:

0%

Estimated time:
spec_ref:
build_status:
build_number:
ci_run_url:
scan_status:
scan_report_url:
deploy_status:
preprod_url:
deployed_at:
branch:
pr_url:
security_key:
severity:
paused:

Description

h2. Live Wise API pull — bank account as source of truth

Replace the manual CSV statement import as the primary path with a live pull from the Wise API, so the bank account becomes the source of truth for income/expense and reconciliation.

*Note on process:* this Feature was designed via the architect-design flow (see design doc) rather than the Submitted->Spec automation, and is created at "In development" to track work already built and heading to dev.

h3. Scope (spans both repos)
* *API* (businessmanager-api): Wise HTTP adapter behind the existing @BankAdapter@ port (no SDK), SCA signing (RSA PKCS#1 v1.5 + SHA-256, single-use OTT, bounded 429/5xx backoff), @UpsertPreservingRecon@ (Wise owns the bank fact, app keeps reconciliation state), @SyncFromBank@ (fetch->upsert->audit in one transaction), @POST /api/v1/bank/sync@ (OWNER-gated, tenant-scoped), migration *0015* (wise_profile_id / wise_balance_id), and @server wise discover@ CLI.
* *Web* (businessmanager-web): "Sync from Wise" button on the Reconcile screen, data-seam wiring (@syncBank@), onboarding fields (WISE_SCA_PRIVATE_KEY + profile/balance ids).

h3. Design
docs/architecture/04-wise-live-pull.md (api repo).

h3. State / risks
* Built, code-reviewed (ship-with-fixes, no blockers, fixes applied), gates green: @go build/vet/make test@ (incl. testcontainers) and @npm run build@.
* *NOT yet verified against the real Wise API* — only a mocked Wise server. Sandbox validation (api.wise-sandbox.com) pending.
* DB migration *0015* runs against each environment on deploy.
* Owner setup before live use: register the SCA public key in Wise, paste WISE_API_TOKEN + WISE_SCA_PRIVATE_KEY, run @server wise discover@ for the profile id.

h3. Branches
* businessmanager-api: @feature/<this-id>-wise-live-pull@ -> PR to @dev@
* businessmanager-web: @feature/<this-id>-wise-live-pull@ -> PR to @dev@

RA Updated by Redmine Admin about 1 month ago Actions #1

  • Status changed from Submitted to In development

Moving to In development — feature already built (architect-design flow), code-reviewed, gates green; opening feature branches + PRs to dev. Not yet verified against the real Wise API (sandbox validation pending).

RA Updated by Redmine Admin about 1 month ago Actions #2

Branches pushed (gates green on both: go build/vet/make test; npm run build):
* businessmanager-api: @feature/1259-wise-live-pull@
* businessmanager-web: @feature/1259-wise-live-pull@

PRs to @dev@ not yet opened — the available CI GitHub token can push but lacks Pull-requests:write. Open via:
* api: https://github.com/omdev-tech/businessmanager-api/compare/dev...feature/1259-wise-live-pull?expand=1
* web: https://github.com/omdev-tech/businessmanager-web/compare/dev...feature/1259-wise-live-pull?expand=1

Still pending before live use: sandbox validation against api.wise-sandbox.com; register SCA public key in Wise; set WISE_API_TOKEN + WISE_SCA_PRIVATE_KEY; run `server wise discover`. Migration 0015 runs per-env on deploy.

RA Updated by Redmine Admin about 1 month ago Actions #3

PRs opened to @dev@ (both green; cross-linked):
* api: https://github.com/omdev-tech/businessmanager-api/pull/1
* web: https://github.com/omdev-tech/businessmanager-web/pull/1

Next: review + merge to @dev@, then promote @dev -> preprod -> master@ through the Jenkins human gate. Pending before live use: sandbox validation (api.wise-sandbox.com), register SCA public key in Wise, set WISE_API_TOKEN + WISE_SCA_PRIVATE_KEY, run `server wise discover`. Migration 0015 runs per-env on deploy.

RA Updated by Redmine Admin about 1 month ago Actions #4

Both feature PRs merged into @dev@ (api 2bb4bdb, web 80c7d7ca). dev runs lint/test only.
Next: dev->preprod PR+merge (build+deploy preprod), then preprod->master PR+merge (Jenkins manual approval -> prod). Migration 0015 runs on the preprod and prod deploys.

RA Updated by Redmine Admin about 1 month ago Actions #5

Promotion progress (#1259):
* feature->dev merged (api 2bb4bdb, web 80c7d7ca)
* dev->preprod merged (api 8219cdf8, web ac5a8a20) — preprod deployed green (confirmed via Jenkins; the §7 Redmine write-back did not fire for this project)
* preprod->master PRs open: api PR#3, web PR#3 — about to merge -> triggers Jenkins master build which pauses at the manual prod approval gate.

Remaining: human approves the prod Deploy in Jenkins (master build paused input). Migration 0015 runs on prod approval. Live Wise sync still needs WISE_API_TOKEN + WISE_SCA_PRIVATE_KEY + registered SCA public key + `server wise discover` before it functions (else 503).

Actions

Also available in: PDF Atom