bunq-cli 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. bunq_cli-0.2.0/.github/workflows/release.yml +59 -0
  2. bunq_cli-0.2.0/.gitignore +13 -0
  3. bunq_cli-0.2.0/LICENSE +21 -0
  4. bunq_cli-0.2.0/PKG-INFO +68 -0
  5. bunq_cli-0.2.0/README.md +38 -0
  6. bunq_cli-0.2.0/docs/accounts.md +38 -0
  7. bunq_cli-0.2.0/docs/callbacks.md +59 -0
  8. bunq_cli-0.2.0/docs/cards.md +65 -0
  9. bunq_cli-0.2.0/docs/getting-started.md +212 -0
  10. bunq_cli-0.2.0/docs/payment-requests.md +67 -0
  11. bunq_cli-0.2.0/docs/payments.md +165 -0
  12. bunq_cli-0.2.0/pyproject.toml +51 -0
  13. bunq_cli-0.2.0/setup.cfg +4 -0
  14. bunq_cli-0.2.0/src/bunq_cli/__init__.py +0 -0
  15. bunq_cli-0.2.0/src/bunq_cli/client.py +845 -0
  16. bunq_cli-0.2.0/src/bunq_cli/commands/__init__.py +0 -0
  17. bunq_cli-0.2.0/src/bunq_cli/commands/accounts.py +37 -0
  18. bunq_cli-0.2.0/src/bunq_cli/commands/bunqme.py +75 -0
  19. bunq_cli-0.2.0/src/bunq_cli/commands/callbacks.py +122 -0
  20. bunq_cli-0.2.0/src/bunq_cli/commands/cards.py +122 -0
  21. bunq_cli-0.2.0/src/bunq_cli/commands/drafts.py +79 -0
  22. bunq_cli-0.2.0/src/bunq_cli/commands/events.py +37 -0
  23. bunq_cli-0.2.0/src/bunq_cli/commands/login.py +131 -0
  24. bunq_cli-0.2.0/src/bunq_cli/commands/oauth_client.py +113 -0
  25. bunq_cli-0.2.0/src/bunq_cli/commands/payments.py +90 -0
  26. bunq_cli-0.2.0/src/bunq_cli/commands/profiles.py +91 -0
  27. bunq_cli-0.2.0/src/bunq_cli/commands/requests.py +122 -0
  28. bunq_cli-0.2.0/src/bunq_cli/commands/sandbox.py +25 -0
  29. bunq_cli-0.2.0/src/bunq_cli/commands/scheduled.py +108 -0
  30. bunq_cli-0.2.0/src/bunq_cli/commands/statements.py +97 -0
  31. bunq_cli-0.2.0/src/bunq_cli/config.py +180 -0
  32. bunq_cli-0.2.0/src/bunq_cli/main.py +210 -0
  33. bunq_cli-0.2.0/src/bunq_cli/oauth.py +176 -0
  34. bunq_cli-0.2.0/src/bunq_cli/output.py +65 -0
  35. bunq_cli-0.2.0/src/bunq_cli.egg-info/PKG-INFO +68 -0
  36. bunq_cli-0.2.0/src/bunq_cli.egg-info/SOURCES.txt +48 -0
  37. bunq_cli-0.2.0/src/bunq_cli.egg-info/dependency_links.txt +1 -0
  38. bunq_cli-0.2.0/src/bunq_cli.egg-info/entry_points.txt +2 -0
  39. bunq_cli-0.2.0/src/bunq_cli.egg-info/requires.txt +7 -0
  40. bunq_cli-0.2.0/src/bunq_cli.egg-info/scm_file_list.json +44 -0
  41. bunq_cli-0.2.0/src/bunq_cli.egg-info/scm_version.json +8 -0
  42. bunq_cli-0.2.0/src/bunq_cli.egg-info/top_level.txt +1 -0
  43. bunq_cli-0.2.0/tests/__init__.py +0 -0
  44. bunq_cli-0.2.0/tests/conftest.py +30 -0
  45. bunq_cli-0.2.0/tests/test_cli.py +109 -0
  46. bunq_cli-0.2.0/tests/test_commands/__init__.py +0 -0
  47. bunq_cli-0.2.0/tests/test_config.py +103 -0
  48. bunq_cli-0.2.0/tests/test_oauth.py +62 -0
  49. bunq_cli-0.2.0/tests/test_output.py +46 -0
  50. bunq_cli-0.2.0/tests/test_profiles.py +80 -0
@@ -0,0 +1,59 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags: ["v*"]
6
+
7
+ jobs:
8
+ test:
9
+ runs-on: ubuntu-latest
10
+ strategy:
11
+ matrix:
12
+ python-version: ["3.11", "3.12", "3.13"]
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ with:
16
+ fetch-depth: 0
17
+ - uses: actions/setup-python@v5
18
+ with:
19
+ python-version: ${{ matrix.python-version }}
20
+ - run: pip install -e ".[dev]"
21
+ - run: pytest -q
22
+
23
+ build:
24
+ needs: test
25
+ runs-on: ubuntu-latest
26
+ steps:
27
+ - uses: actions/checkout@v4
28
+ with:
29
+ fetch-depth: 0 # setuptools-scm needs the tags
30
+ - uses: actions/setup-python@v5
31
+ with:
32
+ python-version: "3.13"
33
+ - run: pip install build twine
34
+ - run: python -m build
35
+ - run: twine check --strict dist/*
36
+ - name: Check that the package version matches the tag
37
+ run: |
38
+ expected="${GITHUB_REF_NAME#v}"
39
+ ls dist/ | grep -q "bunq_cli-${expected}.tar.gz" || {
40
+ echo "Built $(ls dist/), expected version ${expected}"; exit 1; }
41
+ - uses: actions/upload-artifact@v4
42
+ with:
43
+ name: dist
44
+ path: dist/
45
+
46
+ publish:
47
+ needs: build
48
+ runs-on: ubuntu-latest
49
+ environment:
50
+ name: pypi
51
+ url: https://pypi.org/project/bunq-cli/
52
+ permissions:
53
+ id-token: write # PyPI trusted publishing
54
+ steps:
55
+ - uses: actions/download-artifact@v4
56
+ with:
57
+ name: dist
58
+ path: dist/
59
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,13 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *$py.class
4
+ *.egg-info/
5
+ dist/
6
+ build/
7
+ .eggs/
8
+ *.egg
9
+ .venv/
10
+ venv/
11
+ .pytest_cache/
12
+ .mypy_cache/
13
+ *.conf
bunq_cli-0.2.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Koert van der Veer
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,68 @@
1
+ Metadata-Version: 2.4
2
+ Name: bunq-cli
3
+ Version: 0.2.0
4
+ Summary: Command-line interface for the Bunq API
5
+ Author-email: Koert van der Veer <koert@ondergetekende.nl>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/ondergetekende/bunq-cli
8
+ Project-URL: Repository, https://github.com/ondergetekende/bunq-cli
9
+ Project-URL: Issues, https://github.com/ondergetekende/bunq-cli/issues
10
+ Keywords: bunq,banking,cli,payments,finance
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: End Users/Desktop
14
+ Classifier: Intended Audience :: System Administrators
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Topic :: Office/Business :: Financial
20
+ Requires-Python: >=3.11
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: click>=8.1
24
+ Requires-Dist: bunq-sdk>=1.28
25
+ Requires-Dist: requests>=2.24
26
+ Requires-Dist: tabulate>=0.9
27
+ Provides-Extra: dev
28
+ Requires-Dist: pytest>=7.0; extra == "dev"
29
+ Dynamic: license-file
30
+
31
+ # Bunq CLI
32
+
33
+ A command-line interface for [Bunq](https://www.bunq.com/), the online bank. Manage accounts, payments, cards, and more from your terminal.
34
+
35
+ > **Disclaimer:** This project is not affiliated with, endorsed by, or in any way associated with Bunq B.V. "Bunq" is a trademark of Bunq N.V. This is an independent, open-source tool that uses the public Bunq API.
36
+
37
+ ## Quick start
38
+
39
+ ```bash
40
+ pip install bunq-cli
41
+ bunq login
42
+ bunq accounts list
43
+ bunq payments list --account "My Account"
44
+ ```
45
+
46
+ See [Getting Started](docs/getting-started.md) for full setup instructions, output formats, pagination, and global options.
47
+
48
+ ## Documentation
49
+
50
+ | Guide | What it covers |
51
+ | --- | --- |
52
+ | [Getting Started](docs/getting-started.md) | Installation, authentication, profiles (multiple clients), sandbox mode, output formats, pagination, global options |
53
+ | [Accounts](docs/accounts.md) | Monetary accounts: list, get, create savings goals |
54
+ | [Payments](docs/payments.md) | Payments, drafts, scheduled payments, batch payments, international transfers |
55
+ | [Payment Requests](docs/payment-requests.md) | Request money from others, manage incoming requests |
56
+ | [Cards](docs/cards.md) | Card management: list, get, update settings, freeze/unfreeze |
57
+ | [Callbacks](docs/callbacks.md) | Notification filters and webhook management |
58
+
59
+ ## Tech stack
60
+
61
+ - [Python](https://www.python.org/) >= 3.11
62
+ - [Click](https://click.palletsprojects.com/) for the CLI framework
63
+ - [bunq SDK](https://github.com/bunq/sdk_python) for the Bunq API
64
+ - [Tabulate](https://pypi.org/project/tabulate/) for table formatting
65
+
66
+ ## License
67
+
68
+ MIT -- see [LICENSE](LICENSE).
@@ -0,0 +1,38 @@
1
+ # Bunq CLI
2
+
3
+ A command-line interface for [Bunq](https://www.bunq.com/), the online bank. Manage accounts, payments, cards, and more from your terminal.
4
+
5
+ > **Disclaimer:** This project is not affiliated with, endorsed by, or in any way associated with Bunq B.V. "Bunq" is a trademark of Bunq N.V. This is an independent, open-source tool that uses the public Bunq API.
6
+
7
+ ## Quick start
8
+
9
+ ```bash
10
+ pip install bunq-cli
11
+ bunq login
12
+ bunq accounts list
13
+ bunq payments list --account "My Account"
14
+ ```
15
+
16
+ See [Getting Started](docs/getting-started.md) for full setup instructions, output formats, pagination, and global options.
17
+
18
+ ## Documentation
19
+
20
+ | Guide | What it covers |
21
+ | --- | --- |
22
+ | [Getting Started](docs/getting-started.md) | Installation, authentication, profiles (multiple clients), sandbox mode, output formats, pagination, global options |
23
+ | [Accounts](docs/accounts.md) | Monetary accounts: list, get, create savings goals |
24
+ | [Payments](docs/payments.md) | Payments, drafts, scheduled payments, batch payments, international transfers |
25
+ | [Payment Requests](docs/payment-requests.md) | Request money from others, manage incoming requests |
26
+ | [Cards](docs/cards.md) | Card management: list, get, update settings, freeze/unfreeze |
27
+ | [Callbacks](docs/callbacks.md) | Notification filters and webhook management |
28
+
29
+ ## Tech stack
30
+
31
+ - [Python](https://www.python.org/) >= 3.11
32
+ - [Click](https://click.palletsprojects.com/) for the CLI framework
33
+ - [bunq SDK](https://github.com/bunq/sdk_python) for the Bunq API
34
+ - [Tabulate](https://pypi.org/project/tabulate/) for table formatting
35
+
36
+ ## License
37
+
38
+ MIT -- see [LICENSE](LICENSE).
@@ -0,0 +1,38 @@
1
+ # Accounts
2
+
3
+ Monetary accounts in Bunq are your bank accounts -- current accounts, savings accounts, and joint accounts. Every payment and card is tied to a monetary account.
4
+
5
+ ## Listing accounts
6
+
7
+ ```bash
8
+ # All active accounts
9
+ bunq accounts list
10
+
11
+ # Include closed accounts
12
+ bunq accounts list --include-inactive
13
+ ```
14
+
15
+ ## Viewing an account
16
+
17
+ ```bash
18
+ bunq accounts get 12345
19
+ ```
20
+
21
+ This shows the full account details including IBAN, balance, and settings.
22
+
23
+ ## Account types
24
+
25
+ Bunq offers several account types. The CLI displays the type in list output:
26
+
27
+ - **MonetaryAccountBank** -- standard current accounts
28
+ - **MonetaryAccountSavings** -- savings accounts
29
+ - **MonetaryAccountJoint** -- shared accounts with another Bunq user
30
+
31
+ ## Checking your balance
32
+
33
+ ```bash
34
+ # Quick overview of all balances
35
+ bunq accounts list --output table
36
+ ```
37
+
38
+ The table output includes the account description, IBAN, and current balance.
@@ -0,0 +1,59 @@
1
+ # Callbacks
2
+
3
+ Callbacks (notification filters) let you receive real-time HTTP notifications when events happen on your Bunq account -- for example, when a payment is received or a card transaction occurs. This is useful for integrating Bunq with other systems.
4
+
5
+ ## Listing callbacks
6
+
7
+ ```bash
8
+ bunq callbacks list
9
+ ```
10
+
11
+ ## Creating a callback
12
+
13
+ ```bash
14
+ bunq callbacks create \
15
+ --url "https://example.com/webhooks/bunq" \
16
+ --category MUTATION
17
+ ```
18
+
19
+ **Categories:**
20
+
21
+ | Category | Events |
22
+ |---|---|
23
+ | `MUTATION` | Any balance change (payments, requests, iDEAL, etc.) |
24
+ | `PAYMENT` | Incoming and outgoing payments |
25
+ | `INSTANT_PAYMENT` | Instant (SCT Inst) payments |
26
+ | `REQUEST` | Payment request updates |
27
+ | `CARD_TRANSACTION_SUCCESSFUL` | Successful card transactions |
28
+ | `CARD_TRANSACTION_FAILED` | Declined card transactions |
29
+ | `SCHEDULE_STATUS` | Scheduled payment status changes |
30
+ | `BUNQME_TAB` | bunq.me request updates |
31
+ | `OAUTH` | OAuth connection revoked |
32
+
33
+ Run `bunq callbacks create --help` for the full list. The URL must use HTTPS. New filters are added to the existing ones.
34
+
35
+ Subscribe to multiple categories:
36
+
37
+ ```bash
38
+ bunq callbacks create \
39
+ --url "https://example.com/webhooks/bunq" \
40
+ --category MUTATION \
41
+ --category CARD_TRANSACTION_SUCCESSFUL
42
+ ```
43
+
44
+ ## Deleting callbacks
45
+
46
+ Removes all notification filters:
47
+
48
+ ```bash
49
+ bunq callbacks delete
50
+ ```
51
+
52
+ ## Failed callbacks
53
+
54
+ bunq retries a failed callback 5 times, one minute apart. After that it is stored as a failure, which you can list and retry:
55
+
56
+ ```bash
57
+ bunq callbacks failures
58
+ bunq callbacks retry 101 102 103
59
+ ```
@@ -0,0 +1,65 @@
1
+ # Cards
2
+
3
+ Bunq issues debit cards (Maestro and Mastercard) that are linked to your monetary accounts. The CLI lets you view and manage your cards.
4
+
5
+ ## Listing cards
6
+
7
+ ```bash
8
+ bunq cards list
9
+ ```
10
+
11
+ ## Viewing a card
12
+
13
+ ```bash
14
+ bunq cards get 12345
15
+ ```
16
+
17
+ This shows the card type, status, linked accounts, spending limits, and card settings.
18
+
19
+ ## Updating card settings
20
+
21
+ ### Freeze and unfreeze
22
+
23
+ Temporarily disable a card without cancelling it:
24
+
25
+ ```bash
26
+ bunq cards freeze 12345
27
+ bunq cards unfreeze 12345
28
+ ```
29
+
30
+ ### Spending limits
31
+
32
+ Update the daily spending and ATM limits:
33
+
34
+ ```bash
35
+ bunq cards update 12345 --daily-limit 500.00
36
+ bunq cards update 12345 --atm-limit 250.00
37
+ ```
38
+
39
+ ### PIN code
40
+
41
+ ```bash
42
+ bunq cards update 12345 --change-pin
43
+ ```
44
+
45
+ You'll be prompted for the new PIN, so it doesn't end up in your shell history.
46
+
47
+ ### Linked accounts
48
+
49
+ Change which account a card draws from:
50
+
51
+ ```bash
52
+ bunq cards update 12345 --account 67890
53
+ ```
54
+
55
+ ### Country permissions
56
+
57
+ Restrict where a card can be used:
58
+
59
+ ```bash
60
+ # Allow only domestic transactions
61
+ bunq cards update 12345 --country-permission NL
62
+
63
+ # Allow multiple countries
64
+ bunq cards update 12345 --country-permission NL --country-permission DE --country-permission BE
65
+ ```
@@ -0,0 +1,212 @@
1
+ # Getting Started
2
+
3
+ ## What is Bunq?
4
+
5
+ [Bunq](https://www.bunq.com/) is a Dutch online bank that offers personal and business accounts, cards, and payments. It provides a public API for building integrations.
6
+
7
+ This CLI lets you interact with your Bunq accounts from the terminal -- useful for scripting, automation, and quick lookups without opening the app.
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ pip install bunq-cli
13
+ ```
14
+
15
+ This installs a `bunq` command in your PATH.
16
+
17
+ ## Authentication
18
+
19
+ ### Step 1: Get an API key
20
+
21
+ You need an API key for initial setup. Open the Bunq app on your phone:
22
+
23
+ 1. Go to **Profile** > **Security & Privacy** > **Developers** > **API keys**.
24
+ 2. Create a new API key and copy it.
25
+
26
+ Log in with it:
27
+
28
+ ```bash
29
+ bunq login --token YOUR_API_KEY
30
+ ```
31
+
32
+ ### Step 2: Register an OAuth client
33
+
34
+ Bunq doesn't have a web portal for OAuth client registration -- it's done via the API. The CLI handles this for you:
35
+
36
+ ```bash
37
+ bunq oauth-client register
38
+ ```
39
+
40
+ This creates an OAuth client, registers the local callback URL, and stores the `client_id` and `client_secret` in `~/.config/bunq-cli.toml`. You can inspect them with:
41
+
42
+ ```bash
43
+ bunq oauth-client show
44
+ ```
45
+
46
+ You only need to do this once. Each Bunq user can have one OAuth client.
47
+
48
+ ### Step 3: Log in with OAuth
49
+
50
+ From now on, you can log in without an API key:
51
+
52
+ ```bash
53
+ bunq login
54
+ ```
55
+
56
+ This opens your browser, you approve access on Bunq's website, and the CLI receives a token automatically via a local server on `http://127.0.0.1:12345/callback`.
57
+
58
+ ### API key (alternative)
59
+
60
+ If you prefer to skip OAuth entirely (e.g., for scripting or server environments where a browser isn't available), you can always use an API key directly:
61
+
62
+ ```bash
63
+ bunq login --token YOUR_API_KEY
64
+ ```
65
+
66
+ API keys are only permitted for private integrations that you control yourself.
67
+
68
+ ### Allowed IP addresses
69
+
70
+ bunq invalidates a new API key if it isn't assigned to an IP address within 4 hours. `bunq login` does this when it registers the device. By default (`*`) bunq assigns the IP you log in from, or allows any IP if you created a wildcard API key in the app. To restrict the key to specific addresses:
71
+
72
+ ```bash
73
+ bunq login --token YOUR_API_KEY --allowed-ip 203.0.113.10 --allowed-ip 2001:db8::1
74
+ ```
75
+
76
+ ### Environment variable override
77
+
78
+ If you want to override the stored OAuth credentials (e.g., for testing), set these environment variables:
79
+
80
+ ```bash
81
+ export BUNQ_OAUTH_CLIENT_ID="your-client-id"
82
+ export BUNQ_OAUTH_CLIENT_SECRET="your-client-secret"
83
+ ```
84
+
85
+ Environment variables take precedence over the config file.
86
+
87
+ ### Logging out
88
+
89
+ ```bash
90
+ bunq logout # the selected profile
91
+ bunq logout --profile acme
92
+ bunq logout --all
93
+ ```
94
+
95
+ This closes the session and removes the profile's stored credentials.
96
+
97
+ ## Profiles (multiple clients)
98
+
99
+ Each login is stored as a named profile, so you can work with several bunq users -- for example one per client. Your first login becomes the `default` profile; once profiles exist, `bunq login` needs `--profile NAME` so it never overwrites another client's login.
100
+
101
+ ```bash
102
+ # Your own account registers the OAuth client once (see above)
103
+ bunq login --profile me --token YOUR_API_KEY
104
+ bunq --profile me oauth-client register
105
+
106
+ # Each client approves via OAuth (they scan the QR code with their bunq app) ...
107
+ bunq login --profile acme
108
+ # ... or gives you an API key
109
+ bunq login --profile jansen --token THEIR_API_KEY
110
+
111
+ bunq profiles list # name, client name, environment, read-only, logged in
112
+ bunq profiles use acme # set the default profile
113
+ bunq profiles rename jansen jansen-bv
114
+ bunq profiles set acme --read-only # block commands that change data
115
+ ```
116
+
117
+ Select a profile per command with `--profile`/`-p` or the `BUNQ_PROFILE` environment variable; otherwise the default profile is used. With several profiles and no default, the CLI refuses to guess.
118
+
119
+ Confirmation prompts show which client you're acting for:
120
+
121
+ ```
122
+ [Acme B.V. (acme)] Pay 750.00 EUR to Landlord B.V. (NL02ABNA0123456789) from the primary account? [y/N]
123
+ ```
124
+
125
+ Pass `--yes` to skip the prompt in scripts.
126
+
127
+ ### Running a command for all clients
128
+
129
+ `--all-profiles` runs a read-only command for every profile and merges the results, adding a `profile` column:
130
+
131
+ ```bash
132
+ bunq --all-profiles accounts list
133
+ bunq --all-profiles --output json payments list --count 10
134
+ bunq --all-profiles statements create --from 2026-01-01 --to 2026-03-31
135
+ bunq --all-profiles statements download 123 -o "statements/{profile}.csv"
136
+ ```
137
+
138
+ Commands that change data (payments, cards, callbacks, ...) are refused. A failure for one client is reported on stderr and doesn't stop the others; the exit code is 1 if any profile failed.
139
+
140
+ Accessing other bunq users' data is subject to bunq's API terms and may require a PSD2 license; check this before using the CLI for clients.
141
+
142
+ ## Sandbox mode
143
+
144
+ Bunq provides a sandbox environment for testing. To use it:
145
+
146
+ ```bash
147
+ bunq login --sandbox
148
+ bunq login --token YOUR_SANDBOX_TOKEN --sandbox
149
+ ```
150
+
151
+ Sandbox mode uses the `https://public-api.sandbox.bunq.com` endpoint instead of production.
152
+
153
+ Create a sandbox test user and log in with it as a new profile:
154
+
155
+ ```bash
156
+ bunq sandbox create-user --login sandbox-test
157
+ ```
158
+
159
+ Without `--login` the new user's API key is printed. To get sandbox money, request it from bunq's test account:
160
+
161
+ ```bash
162
+ bunq requests create --counterparty-email sugardaddy@bunq.com --amount 500.00 --description "Sandbox money"
163
+ ```
164
+
165
+ ## Output formats
166
+
167
+ By default the CLI prints tables when you're in a terminal, and JSON when output is piped:
168
+
169
+ ```bash
170
+ # Human-readable table
171
+ bunq accounts list
172
+
173
+ # JSON for scripting
174
+ bunq accounts list | jq '.[].description'
175
+
176
+ # Force a format
177
+ bunq accounts list --output json
178
+ bunq accounts list --output table
179
+ ```
180
+
181
+ ## Pagination
182
+
183
+ All `list` commands return the first page of results by default. To fetch everything:
184
+
185
+ ```bash
186
+ bunq payments list --all
187
+ ```
188
+
189
+ Or navigate manually:
190
+
191
+ ```bash
192
+ bunq payments list --count 50 --older-id 12345
193
+ bunq payments list --newer-id 67890
194
+ ```
195
+
196
+ The `--all` flag handles Bunq's cursor-based pagination automatically.
197
+
198
+ ## Global options
199
+
200
+ These can be used with any command:
201
+
202
+ | Option | Description |
203
+ |---|---|
204
+ | `--help` | Show help for a command |
205
+ | `--version` | Show version |
206
+ | `-v, --verbose` | Print HTTP requests to stderr |
207
+ | `-q, --quiet` | Suppress non-error output |
208
+ | `--token TOKEN` | Override the stored API token |
209
+ | `--output auto\|json\|table` | Force output format |
210
+ | `--no-color` | Disable colored output |
211
+ | `--config PATH` | Use a custom config file |
212
+ | `--sandbox` | Use the sandbox environment |
@@ -0,0 +1,67 @@
1
+ # Payment Requests
2
+
3
+ Payment requests (called "Request Inquiries" in the Bunq API) let you request money from other people. The recipient receives a notification and can accept or reject the request.
4
+
5
+ ## Creating a request
6
+
7
+ Request money from another Bunq user by email or phone:
8
+
9
+ ```bash
10
+ bunq requests create \
11
+ --account 12345 \
12
+ --amount 35.00 \
13
+ --currency EUR \
14
+ --counterparty-email friend@example.com \
15
+ --description "Concert tickets"
16
+ ```
17
+
18
+ Or by phone number:
19
+
20
+ ```bash
21
+ bunq requests create \
22
+ --account 12345 \
23
+ --amount 15.00 \
24
+ --counterparty-phone "+31612345678" \
25
+ --description "Lunch"
26
+ ```
27
+
28
+ ## Listing sent requests
29
+
30
+ ```bash
31
+ # Requests you sent
32
+ bunq requests list --account 12345
33
+
34
+ # All pages
35
+ bunq requests list --account 12345 --all
36
+ ```
37
+
38
+ ## Viewing a request
39
+
40
+ ```bash
41
+ bunq requests get 67890 --account 12345
42
+ ```
43
+
44
+ The output shows the status: `PENDING`, `ACCEPTED`, `REJECTED`, `REVOKED`, or `EXPIRED`.
45
+
46
+ ## Revoking a request
47
+
48
+ Cancel a pending request:
49
+
50
+ ```bash
51
+ bunq requests revoke 67890 --account 12345
52
+ ```
53
+
54
+ ## Incoming requests
55
+
56
+ View payment requests others have sent to you:
57
+
58
+ ```bash
59
+ # List incoming requests
60
+ bunq requests incoming --account 12345
61
+
62
+ # Accept a request
63
+ bunq requests accept 67890 --account 12345
64
+
65
+ # Reject a request
66
+ bunq requests reject 67890 --account 12345
67
+ ```