Node 24 TypeScript script for downloading Wise balance statements as JSON.
Run these from the project root:
mise trust mise.toml
mise install
pnpm install
cp .env.example .envSet WISE_API_TOKEN in .env.
This is for Wise business profiles where Wise supports balance statements via personal API tokens.
Wise documents that EU/UK profiles cannot view balance statements via personal API tokens due to PSD2. Personal profiles are not supported by this private-key SCA signing flow.
Business balance statements require SCA signing.
Generate a keypair:
pnpm generate-keypairUpload this file in Wise under API tokens / Manage public keys for each business profile you want to use:
keys/wise-public.pem
Keep this file local:
keys/wise-private.pem
Public keys are profile-specific. A key uploaded for one business profile does not authorize another business profile.
Use a different keypair with:
pnpm statements --profile-name "Example Business Ltd" --private-key keys/example-business-private.pem --start 2026-01-01 --end 2026-01-31Upload the matching public key for that profile.
List profiles:
pnpm list-profilesDownload statements:
pnpm statements --start 2026-01-01 --end 2026-01-31Use a specific profile:
pnpm statements --profile-id 123456 --start 2026-01-01 --end 2026-01-31
pnpm statements --profile-name "Example Business Ltd" --start 2026-01-01 --end 2026-01-31Choose currencies:
pnpm statements --start 2026-01-01 --end 2026-01-31 --currencies USD,EUR,GBPStatements are written to statements/, which is gitignored.