Download Wise.com Account Balance Statements as PDF via API

Thomas Witt
Thomas Witt
Published in
3 min readNov 23, 2023

--

I utilize Wise.com (formerly Transferwise) for managing several business accounts and find it generally reliable and efficient, except for some initial account setup annoyances. A recurring challenge is downloading account statements, which involves multiple steps and clicks, particularly when dealing with multiple currencies. To streamline this process, I developed a script for automated downloads.

The Wise API documentation is adequate, though occasionally lacking in detail. Also, at least in the EU, downloading balance statements requires two-factor authentication, not just a simple API call. This process involves making an API call, receiving a challenge, signing it with an RSA certificate, and then reissuing the request. Although it’s not complex, it took some time to perfect.

I created a user-friendly script that prompts for your Wise personal API token, account selection, statement year, and currency.

Setting this up requires a few steps. I recommend a trial run with a sandbox account at https://sandbox.transferwise.tech/. You’ll need to create an API token with read-only access and back it up securely. Additionally, generate a public key using the following commands in a cloned GitHub repository.

Step-by-Step Guide to Creating a Wise API Token and 2FA Public Key

To set up your API keys, first go to “Settings” and then to “API tokens”:

Create a personal API token in Wise

Click “Add new token”:

Add a new token in Wise.com

Read Only Access for the new token is sufficient:

Read Only Token for wise.com API

In addition to backing up the token in a password manager, you will also need to generate a public key. The most convenient way to do this is by cloning my GitHub repository containing the script and creating the key directly within that environment:

git clone https://github.com/thomaswitt/wise-statement-downloader.git
cd wise-statement-downloader
mkdir certs
openssl genrsa -out certs/wise-private.pem 2048
openssl rsa -pubout -in certs/wise-private.pem -out certs/wise-public.pem

Make sure you’ll also backup the newly created RSA key.

That’s essentially all there is to it. After completing these steps, you can run the script to easily obtain your first account statement:

thomas@mac:~/Dev/wise-statement-downloader(main) $ ./wise.bash test
*** Using Sandbox API Environment
WISE Personal API Token: [CONCEALED]
Choose account:
1: Esmeralda Beasley (2023) (17012841)
Your choice: 1

Choose year for the statement:
1: 2023
Your choice: 1

Choose currency:
1: AUD (1000000.00 AUD) (179137)
2: EUR (1000000.00 EUR) (179096)
3: GBP (1000000.00 GBP) (179136)
4: USD (1000000.00 USD) (179097)
Your choice: 2
Chosen currency: EUR

*** Writing PDF file to output/Wise-17012841-Esmeralda_Beasley-EUR-2023.pdf

The script currently supports downloading annual statements, but it can be easily modified for monthly intervals by adjusting the $STATEMENT_DETAILS variable.

Now just repeat these steps in your main production account — and you’re good to go.

Enjoy the convenience!

--

--

Tech Entrepreneur & Angel Investor @ Expedite Ventures | Seed funding & CTO mentoring for deep tech startups.