Content

Using Bank APIs with Treasury AI Agents

An assistant that can tell you the balance is helpful. An assistant that can send the payment is a different system. Here is the difference, in plain language, and the finance tools we already connect.

EngineeringOct 16, 2026

Key takeaways

  • -In this article we explore using bank APIs with treasury AI agents, and why reading a balance is a different permission from sending a payment.
  • -To understand how a treasury AI agent should be allowed to work: a balance check does not include permission to pay, and two-person approval means two people, not one person saying yes twice in the chat.
  • -A bank cut-off is the time after which a payment may settle on the next business day. Sending that payment again can create two payments when the bank does not store a repeat reference.
  • -On Swytchcode Business and Enterprise, a treasury payment can be held for approval in Slack or Telegram. If nobody approves within 48 hours, the payment is not sent.
  • -The article lists the Finance and Accounting APIs a treasury AI agent can connect in October 2026, including Stripe, Modern Treasury, Ramp, and Xero, and the setup starts with a balance check in sandbox mode.

You want an assistant that can answer a treasury question: what cleared, what is still outstanding, and whether there is enough cash. That is a useful assistant. It becomes a different system the moment it can also send money.

Banks treat those as different permissions, and it helps to keep them apart in your own setup too. This article explains the difference, who else should have to agree before money moves, and what the bank's clock does if a payment is sent twice. Further down is every finance tool currently in our directory, with a short note on what each one is for.

If you have not used Swytchcode before, here is the short version. Your assistant decides what it wants to ask the bank. Swytchcode is the program that makes the call. It only runs actions you have turned on, and it adds the bank login itself so the assistant never sees it.

Looking at the account is not the same as paying

Looking is the safe half. Balances, transactions, account details, sometimes a statement. A treasury person uses this all day to answer "what do we have, and what already posted?" If the number is wrong, you look again. No money has moved.

Paying is the other half. The assistant asks the bank, or the system in front of the bank, to send money. If that goes wrong, recalling it is a new request, not an undo. The other person may already have the funds. The day the money was supposed to arrive may already have passed.

An assistant that builds a cash forecast needs the look-up. An assistant that "pays the approved invoices" needs the payment, and only that payment, not every other thing the bank login can do. Turning on the whole connection because the forecast was convenient is how a reporting assistant learns to pay.

In Swytchcode those are separate actions. You download the bank connection, then you turn on the actions this project may use. An action you have not turned on cannot run. The assistant can ask. The call does not go out.

Follow these steps before you ask for a balance. Replace <provider> with the name from the list further down in this article, such as stripe or modern-treasury. Start with a balance. Do not turn on a payment in the same sitting.

1. Follow this step to install the CLI

swy is the short name for the Swytchcode program. Pick the install that matches your computer.

If you already use Node.js:

npm install -g swytchcode

On Windows, open PowerShell and run:

irm https://cli.swytchcode.com/install.ps1 | iex

On macOS or Linux:

curl -fsSL https://cli.swytchcode.com/install.sh | sh

Then check that the install worked:

swy --version

A version number means the CLI is on your machine. The rest of the install walkthrough is in the CLI quickstart.

2. Follow this step to sign in

swy login

A browser window opens so you can create an account or sign in. Your first two calls that actually reach a service can run before you have an account. After those, you need to be signed in. How accounts and service logins work is in the authentication docs.

3. Follow this step to start a test project

Use the line for the editor you already have.

swy init --editor=claude --mode=sandbox

If you use Cursor, change claude to cursor. If you use Codex, change it to codex. --mode=sandbox means test mode. That choice is saved for this project, in a file called tooling.json. The assistant cannot switch you to a live bank in the chat. What this command creates is in Set up a project.

4. Follow this step to download the finance tool

swy get <provider>

This downloads that connection. It does not turn every action on.

5. Follow this step to find a balance check

swy discover "list account balances" --project <provider>

This searches that connection, in plain English, and prints the current action name. Use that name. Do not copy a name from an old note, including this article. --project keeps the search inside that tool.

6. Follow this step to see what that action needs

swy info <id from discover>

Replace <id from discover> with the name from step 5. This shows the fields. It only works after step 4.

7. Follow this step to turn that one action on

swy add method <id from discover>

This is the on-switch for that one action. A balance check does not include permission to pay.

8. Follow this step to store the bank login

swy auth connect <provider>

This stores the credential on your machine, outside the project. The assistant names what it wants done. It does not receive the credential. Explore this article for that split: credential brokering.

Two people, not one person saying yes twice

Banks have asked for two people on a payment for a long time. One person prepares it. Another person releases it. An assistant does not replace that.

Typing "ask me before you pay" into the instructions is not a second person. The assistant can be talked out of a sentence. Clicking yes in the same chat, as the same person, is still one person.

Swytchcode can pause a payment and send it to Slack or Telegram for a person to approve. That option is on the Business and Enterprise plans. Free and Pro can allow or block an action, but they do not include the approval pause. If nobody approves within 48 hours, the payment is never sent. The details are in human approval for AI agents.

Please read that as your own checkpoint, not as the bank's. The bank may still want its own second approver, its own code, or its own limit. A message in Slack does not satisfy the bank. If the bank says two people, you still need two people on the bank's side. Your pause happens before your system asks the bank at all.

The rule can look at the amount, the currency, or who is being paid. A small transfer between your own accounts and a payment to a new supplier are not the same rule. How to write that rule is Policy-as-Code for AI Agents.

The bank's cut-off

Every payment rail has a cut-off, the time of day after which today's money will not move today. Pay before it, and the payment can settle today. Pay after it, and the bank either takes it for the next business day or rejects it. The hour belongs to that bank, that currency, and that rail. Do not copy a time from a general article.

Two things go wrong when an assistant ignores the clock.

The payment is sent, the answer is slow, and the assistant sends it again. You now have two payments. One of them may have missed the cut-off, so they may not even arrive on the same day.

Or the assistant waits, sends after the cut-off, and tells you it worked because the bank accepted the instruction. Accepted means the bank took the request. It does not mean the cash arrived today.

If the first attempt might have worked, do not send a second payment to "be sure." Some banks recognize a repeat and treat it as the same payment. Many do not. If you are not sure the bank does, look up the first payment instead of sending another. Swytchcode will not retry a payment on its own unless that call carries the same reference as the first attempt. A new reference is a new payment. More on that is in How Swytchcode Retries Failed API Calls and Idempotency Explained.

Also read the body of the answer, not only the status code. A success code can still say the payment was rejected, queued for tomorrow, or waiting on the bank's own approver. The chat should not say "paid" until the answer says the money moved.

What to turn on first

Start with balances and posted transactions. That answers the questions a desk asks all day.

Add a payment only when you can name that one action, with a rule on the amount and the recipient, and with a person on the approval. Do not also turn on "change the beneficiary," "change the mandate," or "create a new payee" because it might be useful later. Those change where money is allowed to go. That is a bigger step than one payment to a supplier you already trust.

Test and live bank logins look similar in a file. They do not look similar on a statement. Test mode is chosen once, when you create the project, and saved in tooling.json. The assistant cannot switch you to live in the middle of a conversation.

Card payments, as opposed to a bank account, are covered in Connect Fintech APIs to Claude and How to Connect Stripe to Claude Code.

Finance tools you can connect today

These are the Finance and Accounting connections in the directory in October 2026. Open the one you use. The listing is the front door. You still choose the actions with the steps above, and a tool being listed in this article does not mean the assistant should be allowed to pay.

Cards and checkouts

  • Stripe takes card payments, refunds, and customer records.
  • Adyen takes cards and local payment methods.
  • PayPal covers payments, billing, and invoices.
  • Square is Square's payment API.
  • Mollie covers common European payment methods.
  • Razorpay is a payments API used in India.
  • Recurly handles subscription billing.
  • Ramp is for corporate cards and company spend.

Banks, payouts, and moving money

Accounting and the books

If your bank is not in this list, tell us. We would rather add it properly than have an assistant guess the request. The directory is also what a search inside Swytchcode looks at.

FAQ

Can the assistant send payments?

Only if you turned that action on, the amount and the recipient pass your rule, and any person who needs to approve has approved. Being allowed to read the balance does not include permission to pay. The bank may still want its own approval after yours.

Does a Slack approval count as two-person approval?

No. Two-person approval means two people. A Slack or Telegram pause is your checkpoint before the request is sent. It is available on Business and Enterprise, and it does nothing if nobody answers within 48 hours. It does not replace a second person the bank asks for.

What if the payment might have been sent twice?

If the second request is a new payment, the bank can accept both. A shared reference helps only when that bank stores it and recognizes the repeat. If you do not know that it does, look up the first payment instead of sending another.

Does the cut-off mean the payment failed?

Not always. Sometimes the bank rejects it. Sometimes it accepts it for the next business day. "The call succeeded" is not "the cash arrived today." Read the value date in the answer.

Where should the bank login live?

On your machine, outside the chat and outside the project files the assistant can open. Step 8 in this article is the command that stores it. The assistant does not pass the login in as part of the request.

Try a balance check first

If you have not installed the CLI yet, start at step 1 in this article. When those steps are done, ask, in plain language, for account balances. Do not ask the assistant to pay anything until you have seen a balance come back and you are happy with who can approve a payment.

You can also give Claude Code, Cursor, or Codex skills.md and ask it to follow the same steps, in test mode, for the finance tool you picked from the list in this article.

If your bank is missing, or you are not sure whether an action reads money or sends it, ask us before you turn it on. Discord is the quick way. The contact form is better if the details are sensitive. Tell us what you wanted the assistant to do. We will help you tell a balance check from a payment.

More content