Skip to main content
Agent Pay gives your AI agents a guarded way to move money — within limits a human approved once. Collect takes money in; send pays money out. Contracts are AP2-aligned mandates; sends and off-session charges pause for Strong Customer Authentication. Atoa enforces every limit server-side.
Your agent calls Atoa, which enforces consent and caps, then collects money in from a customer or sends money out to a payee.

Install

Setup

Get a sandbox API key from the Atoa dashboard and set it in your environment. Sandbox and production keys are separate.
Create a client and register your agent. Registration is idempotent. The ES256 key signs every request; here it’s generated in memory — in production, load it from your secrets manager or use a KMS signer. Both ways to supply credentials — env var vs. explicit — are covered in Authentication.

Receiving or sending?

Decision tree: which way is the money going? Receiving splits on whether the customer is here now — yes is a pay-link (payment.collect, no contract), no is an off-session charge (payment.collect under a COLLECT contract). Sending is payment.send under a SEND contract the owner authorises once.
  • Customer presentpayment.collect returns a pay-link/QR. No contract. → Collect
  • Customer not presentpayment.collect with a contractId, under a COLLECT contract the customer approved once. → Collect
  • Paying outpayment.send under a SEND contract the account owner approved once. → Send

Collect your first payment

Create a pay-link and wait for the result. In sandbox, open the link, pick the Atoa Test Bank, and choose the outcome yourself.

Send your first payout

Create a SEND contract, approve it once at the authorizationUrl, then send. Every payout pauses for the business owner’s approval (SCA) before money moves. In sandbox the recipient account decides the outcome — discover the accounts with atoa.sandboxTestAccounts().
Money moved in sandbox. The next_action approval step applies to every send and every off-session charge — see Collect and Send.

Next

AI agents & tools

Hand the SDK to your model: the tool surface, the loop, and how a human approves.

Collect — money in

Pay-links, off-session charges, SCA, refunds.

Send — money out

Payouts, SCA, batches, contract limits.

Reference

Auth, methods, types, errors, sandbox, go-live.

Download the notebook · run it locally

The full flow as a runnable Jupyter notebook — pip install atoa-agent-pay, add a sandbox ATOA_API_KEY, run.