# AgentaOS - [Monetize your product in a day](https://docs.agentaos.ai/introduction.md): Set up in minutes and start selling the same day. Card, Apple Pay, and Google Pay, with subscriptions, tax, invoices, and payouts all handled for you. - [Quickstart](https://docs.agentaos.ai/getting-started/quickstart.md): Start accepting payments in minutes with AgentaOS. Everything below runs in test mode, with test money. - [Test mode and testing](https://docs.agentaos.ai/getting-started/test-mode.md): Try every part of AgentaOS with test money: switch modes, pay with test cards, check test invoices and webhooks, then go live. - [Dashboard tour](https://docs.agentaos.ai/getting-started/dashboard.md): A tour of app.agentaos.ai: what each page in the sidebar does, and where to find your products, money, invoices, and settings. - [Glossary](https://docs.agentaos.ai/getting-started/glossary.md): Plain-English definitions for the payments and tax terms you'll meet in AgentaOS. - [Product release phases](https://docs.agentaos.ai/getting-started/release-phases.md): What Private preview, Public preview and Generally available mean on an AgentaOS feature, and what to expect from each. - [Revenue & Pricing Audit](https://docs.agentaos.ai/grow/pricing-audit.md): Our AI pricing agent reads your pricing page and writes up how your model compares, where you lose revenue after the sale, and what to change first. Included with your account. - [Build with AI agents](https://docs.agentaos.ai/agents/overview.md): Give your AI agent the AgentaOS skill file. The agent installs the CLI, creates a product, and returns its buyer link. - [MCP server](https://docs.agentaos.ai/mcp/setup.md): Connect Claude, ChatGPT, Cursor or any MCP client to AgentaOS, and every tool your agent can then use. - [Connect Claude.ai or ChatGPT](https://docs.agentaos.ai/mcp/remote-connector.md): Add the AgentaOS connector to Claude.ai or ChatGPT, approve it once, and run your account from chat. - [Agent wallet](https://docs.agentaos.ai/experimental/agent-wallet.md): An on-chain wallet that an AI agent operates. Private preview, available on request. - [Products and payment links](https://docs.agentaos.ai/payments/payment-links.md): Create a product in the dashboard, share its buyer link, and get paid. One-time or subscription, with VAT handled for you. - [Checkouts](https://docs.agentaos.ai/payments/checkouts.md): The hosted checkout your buyers pay on, step by step, and how to create a checkout from your server. - [Subscriptions](https://docs.agentaos.ai/payments/subscriptions.md): Sell a monthly or yearly plan. The buyer pays on the checkout, AgentaOS bills every cycle as merchant of record, and you manage plan changes and cancellations from the dashboard or from code. - [Discount codes](https://docs.agentaos.ai/payments/discount-codes.md): Codes a buyer types at checkout to pay less, or to tell you who sent them. Create them in the dashboard or the CLI. - [Invoices](https://docs.agentaos.ai/payments/invoices.md): Every sale gets a VAT-correct invoice automatically. Create and send invoices by hand, download the PDF, a statement, or a CSV for your accountant. - [Receipts](https://docs.agentaos.ai/payments/receipts.md): Every paid invoice gets a receipt, emailed to the buyer automatically. Download the PDF, or send the email again. - [Customers](https://docs.agentaos.ai/payments/customers.md): Everyone who paid you or whom you billed, with their revenue and payments. Built for you from checkouts and invoices. - [Embedded checkout](https://docs.agentaos.ai/payments/embedded-checkout.md): Put the AgentaOS checkout on your own page, inline or as an overlay, with a script tag, npm, or React. - [Platforms](https://docs.agentaos.ai/connect/overview.md): Run sales for your clients, or for other apps of your own company, from one AgentaOS account. What a platform is and who does what. - [Platform fees](https://docs.agentaos.ai/connect/fees.md): Take a share of each client sale: a percentage of the price before VAT plus a fixed amount, paid to you once the sale clears. - [Bank accounts by API](https://docs.agentaos.ai/connect/bank-accounts.md): Save a bank account for a business you manage from your own app. The bank confirms the holder name; we keep only the last four digits. - [Platform webhooks](https://docs.agentaos.ai/connect/webhooks.md): One webhook endpoint for all your clients. Every event says which business it happened in, and account.updated tells you when a client's verification changes. - [How merchant of record works](https://docs.agentaos.ai/mor/how-it-works.md): The role of a merchant of record when you sell software across borders, and how AgentaOS becomes the legal seller on every transaction. - [Verify your business](https://docs.agentaos.ai/mor/verification.md): The two checks before real money moves: the business review unlocks live sales, and the identity check unlocks payouts. - [Supported countries and currencies](https://docs.agentaos.ai/mor/supported-countries.md): Where you can sell, which payment methods reach which buyers, and the countries where you can get paid out with AgentaOS. - [How tax works](https://docs.agentaos.ai/mor/tax.md): How AgentaOS calculates, collects, and remits VAT as your merchant of record. - [Pricing](https://docs.agentaos.ai/mor/pricing.md): Per-transaction fees plus an optional plan, and a 1% payout fee. No setup costs. You pay when you get paid. - [Account review](https://docs.agentaos.ai/mor/account-review.md): How business verification works before you accept live payments, and what you need to get approved. - [Refunds, disputes and chargebacks](https://docs.agentaos.ai/mor/refunds-and-disputes.md): How you ask for a refund, what a refund or a chargeback takes from your balance, what the reserve covers, and what you do when a buyer disputes a charge. - [Payouts](https://docs.agentaos.ai/payouts/overview.md): How a sale becomes money you can pay out, where the payout goes, when it runs, what it costs, and the documents you get for each payout. - [Add a bank account](https://docs.agentaos.ai/payouts/payout-accounts.md): Save the bank account AgentaOS pays your EUR or USD balance to, and read the name check that follows. - [Stablecoin payouts](https://docs.agentaos.ai/payouts/stablecoin-payouts.md): Be paid in USDC or EURC to a wallet instead of your bank account, per currency. - [Payout statements and self-billed invoices](https://docs.agentaos.ai/payouts/statements.md): The two documents you get with each payout: what the payout statement shows, why AgentaOS issues a self-billed invoice in your name, and how to use both in your books. - [Webhooks](https://docs.agentaos.ai/payments/webhooks.md): Get notified when a payment completes. Register a URL, verify the HMAC-SHA256 signature, and never trust an unverified payload. - [Events](https://docs.agentaos.ai/webhooks/events.md): Every webhook event AgentaOS sends: full payload fields, types, and a JSON example for each. - [Why was I charged by AgentaOS?](https://docs.agentaos.ai/for-customers/why-charged.md): You see a charge from AgentaOS on your statement. Here is what it is and what to do. - [Guides](https://docs.agentaos.ai/guides/introduction.md): Task-based, end-to-end walkthroughs. Pick the outcome you want and follow the steps to get there. - [Accept your first payment](https://docs.agentaos.ai/guides/accept-your-first-payment.md): Create a product in the dashboard, share its buyer link, pay it yourself in test mode, and see the sale, the VAT, and your net. No code. - [Sell a subscription](https://docs.agentaos.ai/guides/sell-a-subscription.md): Create a monthly plan with a free trial, share it, take your first subscriber, change their plan, and cancel. All from the dashboard, in test mode. - [Go live](https://docs.agentaos.ai/guides/go-live.md): Take real money: verify your business, switch to live mode, and copy your products to live. Add a bank account before your first payout. - [Build a platform](https://docs.agentaos.ai/guides/build-a-platform.md): Run your clients' businesses from one AgentaOS account. Add a business, invite the client, get it verified, set your share, and let it sell. Dashboard first, code second. - [Let an AI agent run your store](https://docs.agentaos.ai/guides/ai-agent.md): Connect the AgentaOS MCP server, or give a coding agent the CLI, so an AI agent can create checkouts, check payments and manage subscriptions for you. - [Overview](https://docs.agentaos.ai/sdk/pay-overview.md): @agentaos/pay is the server-side TypeScript SDK for AgentaOS. Install, authenticate, and call any resource in a few lines. - [Checkouts](https://docs.agentaos.ai/sdk/pay-checkouts.md): Create a single payment session with agentaos.checkouts. Standalone or from a payment link template. - [Payment links](https://docs.agentaos.ai/sdk/pay-payment-links.md): Reusable, shareable payment URLs with agentaos.paymentLinks. One-time or recurring subscriptions. - [Subscriptions](https://docs.agentaos.ai/sdk/pay-subscriptions.md): Read and manage recurring billing with agentaos.subscriptions: list, invoices, free trials, plan changes, cancel, credits. No create, by design. - [Invoices](https://docs.agentaos.ai/sdk/pay-invoices.md): Read tax-compliant invoice records with agentaos.invoices. PDFs, statements, CSV exports, and receipts. - [Customers](https://docs.agentaos.ai/sdk/pay-customers.md): Read the people who have paid you with agentaos.customers. - [Businesses](https://docs.agentaos.ai/sdk/pay-businesses.md): Manage your clients' businesses with agentaos.businesses, and act for any of them with the business option. - [Webhooks](https://docs.agentaos.ai/sdk/pay-webhooks.md): Verify signed webhook payloads locally with agentaos.webhooks.verify(). HMAC-SHA256, timing-safe. - [Errors](https://docs.agentaos.ai/sdk/pay-errors.md): The AgentaOSError hierarchy, what triggers each subclass, and exactly how retries and timeouts work. - [Paywall for logged-in users](https://docs.agentaos.ai/sdk/paywall-for-logged-in-users.md): A runnable demo app that puts a Pro plan behind a login: checkout with the user's ID, a success page and a webhook that unlock Pro, an access check, the user's invoices with PDFs, and cancel and upgrade. - [Receive webhooks in Express](https://docs.agentaos.ai/sdk/handle-webhooks.md): Register a webhook URL, verify the signature, and fulfill an order when checkout.session.completed fires. A complete, runnable Express example. - [Install](https://docs.agentaos.ai/cli/install.md): Install the agenta CLI with one command, or via npm if you already run Node. - [Login](https://docs.agentaos.ai/cli/login.md): Authenticate the CLI with your AgentaOS account using the device-code browser flow. - [Verify](https://docs.agentaos.ai/cli/verify.md): Submit your business verification from the terminal, check where it stands, and send it back after changes. - [agenta products](https://docs.agentaos.ai/cli/products.md): Create and list products and subscription plans from the terminal. A product is what the API calls a payment link; its ID is the `linkId`. - [Pay](https://docs.agentaos.ai/cli/pay.md): Create, check, and list checkout sessions from the terminal with agenta pay. - [Subscriptions](https://docs.agentaos.ai/cli/subscriptions.md): List and cancel recurring subscribers from the terminal with agenta subscriptions. - [Discounts](https://docs.agentaos.ai/cli/discounts.md): Create, list, inspect and stop the discount codes buyers type at checkout. - [Customers](https://docs.agentaos.ai/cli/customers.md): List the people who have paid you, from the terminal. - [Invoices](https://docs.agentaos.ai/cli/invoices.md): List invoices and manage receipts from the terminal with agenta invoices. - [Businesses](https://docs.agentaos.ai/cli/businesses.md): Manage your clients' businesses from the terminal, and run any command as one of them with the business option. - [Status](https://docs.agentaos.ai/cli/status.md): Check who you're logged in as, how far along going live you are, and the next command to run. - [Introduction](https://docs.agentaos.ai/api-reference/introduction.md): Base URL, authentication, test and live keys, request format, pagination, errors, rate limits, idempotency, and versioning for the AgentaOS REST API. - [Error codes](https://docs.agentaos.ai/api-reference/error-codes.md): How the API reports errors, the status codes you will see, and how to handle them. - [Create a payment link](https://docs.agentaos.ai/api-reference/payment-links/create.md): Creates a reusable, shareable payment link. - [List payment links](https://docs.agentaos.ai/api-reference/payment-links/list.md): Paginated. See the Money model / Pagination notes on this spec's top-level description. - [Retrieve a payment link](https://docs.agentaos.ai/api-reference/payment-links/retrieve.md): Same fields as create, plus `transactions`: every payment (inbound or outbound) recorded against this link, newest first, same row shape as a Transaction but without the computed `money` breakdown. - [Update a payment link](https://docs.agentaos.ai/api-reference/payment-links/update.md): Partial update: only send the fields you want to change. - [Cancel a payment link](https://docs.agentaos.ai/api-reference/payment-links/cancel.md): Deactivates the link. Existing checkouts already in progress are unaffected; no new checkout can be started from it afterward. This is a state change, not a delete: the link and its payment history stay readable. - [Create a checkout](https://docs.agentaos.ai/api-reference/checkouts/create.md): Creates a checkout session, standalone or built from a payment link with `linkId`. The create and list responses do **not** include a plain `amount`, only `amount_override` (`null` unless you passed one). Call "Retrieve a checkout" for a computed, ready-to-display `amount`. Accepts an `Idempotency-K… - [List checkouts](https://docs.agentaos.ai/api-reference/checkouts/list.md): Paginated. Same fields as create, per item. - [Retrieve a checkout](https://docs.agentaos.ai/api-reference/checkouts/retrieve.md): Adds a computed `amount` (the effective price: `amount_override`, else the linked payment link's amount), plus the link's own `link_amount`/`link_currency`/`link_description`, and the checkout's `transactions` and `invoices` arrays. - [Cancel a checkout](https://docs.agentaos.ai/api-reference/checkouts/cancel.md): Stops the buyer from paying. If a payment already cleared before the cancel call lands, it still completes: cancelling doesn't reach into the card processor or on-chain state after the fact. Only works while the checkout is `open` (`400` otherwise). - [List subscriptions](https://docs.agentaos.ai/api-reference/subscriptions/list.md): Paginated. A subscription is created automatically when a buyer pays a payment link with `type: "subscription"` at checkout: there is no `POST` create endpoint by design. Every field on this resource is camelCase on the wire. - [Preview a plan change](https://docs.agentaos.ai/api-reference/subscriptions/plan-change-preview.md): Quote moving a subscription to another plan. Read-only: nothing is charged or scheduled. The target must be a different subscription product in the same currency and billing interval, and the subscription must be `active` or `trialing`. An upgrade (higher price) is charged now, prorated; a downgrade… - [Change the plan](https://docs.agentaos.ai/api-reference/subscriptions/plan-change.md): Apply a plan change quoted by the preview. Echo the preview's `prorationDate` so the amount charged matches the quote. An upgrade charges the prorated difference on the saved card now and the response carries the new per-cycle amount; a downgrade is scheduled for the current period end (`effectiveAt… - [Cancel a subscription](https://docs.agentaos.ai/api-reference/subscriptions/cancel.md): Cancels at the end of the current paid period by default: the subscriber keeps what they already paid for, no refund. Pass `atPeriodEnd: false` to cancel immediately instead. Calling cancel again on an already-`canceled` subscription is a no-op. Returns `400` if the subscription never completed a fi… - [List a subscription's invoices](https://docs.agentaos.ai/api-reference/subscriptions/invoices.md): Every invoice minted at a renewal cycle for this subscription, newest first. Bounded (latest 100); not paginated. `amount`/`currency` is one already-resolved figure per invoice: the linked capture's settlement earnings when one is available in the invoice's own fiat currency, falling back to the mer… - [List credits given to a subscriber](https://docs.agentaos.ai/api-reference/subscriptions/credits-list.md): Every credit given for this subscription, newest first, and what is left unspent. `balanceMinor` is the customer's whole unspent credit with you, which may include credit given for another of their subscriptions. `createdBy` is the id of the person who gave it. `currency` is the subscription's, and… - [Give a subscriber credit](https://docs.agentaos.ai/api-reference/subscriptions/credits-create.md): Puts credit on the subscriber's account with you. It comes off their next invoice, reducing what their card is charged; no money moves out, and no receipt already issued changes. The credit belongs to the CUSTOMER, so if the same buyer has two subscriptions with you in the same currency it goes to w… - [Resume a subscription](https://docs.agentaos.ai/api-reference/subscriptions/resume.md): Undoes a scheduled cancel-at-period-end before the current period elapses. Only valid on a live subscription that is currently scheduled to cancel; returns `400` if it was never scheduled to cancel or has already gone terminal. - [Create a discount code](https://docs.agentaos.ai/api-reference/discount-codes/create.md): Set at most one of `percentOff` and `amountOffMinor`. Set neither and the code carries no discount at all: the buyer pays full price and you still see who it brought in. A code with no discount cannot carry a `name`, because the code itself is its name. Terms are fixed once created: to change them,… - [List discount codes](https://docs.agentaos.ai/api-reference/discount-codes/list.md): Paginated, archived codes included. What each code takes off, and how many people used it, is on the single-code route. - [Retrieve a discount code](https://docs.agentaos.ai/api-reference/discount-codes/retrieve.md): The only route that reports what a code takes off and how many subscribers used it. - [Stop a discount code](https://docs.agentaos.ai/api-reference/discount-codes/archive.md): The code stops working immediately. Subscribers who already redeemed it keep the discount they were given. - [List customers](https://docs.agentaos.ai/api-reference/customers/list.md): Paginated, newest first, no filters beyond pagination. A customer record is created automatically the first time someone pays you (or you issue them an invoice) with an email attached. There is no `POST` create endpoint: this is a read-only surface. Every field on this resource is camelCase on the w… - [List invoices](https://docs.agentaos.ai/api-reference/invoices/list.md): Paginated. Every checkout issues an invoice: `issued` the moment the checkout is created, `paid` once the payment settles, or `voided` if cancelled. The seller of record is our Estonian entity, AgentaOS's Merchant of Record entity, unless the payment settled to your own on-chain wallet (`seller_mode… - [Retrieve an invoice](https://docs.agentaos.ai/api-reference/invoices/retrieve.md): Same fields as the list, plus `earnings`: a fee/VAT/net breakdown, present only for a card/bank Merchant-of-Record sale with a linked, settled transaction. `null` otherwise (crypto sales, or a not-yet-paid `issued` invoice). - [Void an invoice](https://docs.agentaos.ai/api-reference/invoices/void.md): Marks the accounting record void. It never touches the payment itself: if the buyer already paid, nothing is refunded. Use it to correct a bookkeeping mistake, not to reverse a charge. Irreversible: there is no "un-void"; an already-voided invoice returns `400` on a repeat call. - [Download the invoice PDF](https://docs.agentaos.ai/api-reference/invoices/pdf.md): Response is `application/pdf` (binary), not JSON. Includes seller and buyer details, the amount (plus fiat equivalent and exchange rate for stablecoin payments), and a tax breakdown. - [Download the receipt PDF](https://docs.agentaos.ai/api-reference/invoices/receipt.md): Same document family as the invoice PDF, but titled as a receipt with its own receipt number, for a **paid** invoice. Falls back to the plain invoice PDF (still valid proof of payment) for invoices issued before receipts existed on your account, rather than `404`ing. - [Re-send the receipt email](https://docs.agentaos.ai/api-reference/invoices/send-receipt.md): Sends the paid receipt to the buyer email on file. Only works for a `paid` invoice with a `buyer_email`: returns `400` otherwise. - [Download a statement](https://docs.agentaos.ai/api-reference/invoices/statement.md): A statement-style PDF covering a date range: opening/closing balance, every transaction in the ledger, and a VAT summary grouped by rate. `from` and `to` are both required, unlike the other date filters in this API. - [Export invoices as CSV](https://docs.agentaos.ai/api-reference/invoices/export.md): Up to 5000 rows for the matching filter, built for accounting software: date, invoice number, description, amount and currency, exchange rate and source, tax name/rate/amount, buyer name/company/country/VAT, and status. - [List transactions](https://docs.agentaos.ai/api-reference/transactions/list.md): One unified list of everything that moved money on your account: inbound payments (from checkouts and payment links) and outbound sends, across every rail (card, SEPA bank transfer, stablecoins on-chain), in one feed. Only `confirmed` rows are returned: a pending or failed attempt never appears here… - [List businesses](https://docs.agentaos.ai/api-reference/businesses/list.md): Every business you manage, with its status and your share. Not paginated: returns a plain array. The platform is always the caller's own account; an owner or admin of it. - [Create a business](https://docs.agentaos.ai/api-reference/businesses/create.md): Add a business you manage. It starts in test mode and goes live after its own verification. With `clientEmail`, your client is invited as its admin, and the invitation expires after 7 days. We email the invitation, or with `sendInvitationEmail: false` we send nothing and you send `inviteUrl` yoursel… - [Retrieve a business](https://docs.agentaos.ai/api-reference/businesses/retrieve.md): One business you manage, the same shape as a row of the list. A business you do not manage and an id that does not exist get the same `403`, so the response never confirms an id. - [Resend the invitation](https://docs.agentaos.ai/api-reference/businesses/resend-invitation.md): Send your client's invitation again, to the person last invited. It is a new link that expires after 7 days: the old one stops working. Refused with `409 client_joined` once your client has joined the business. - [Revoke the invitation](https://docs.agentaos.ai/api-reference/businesses/revoke-invitation.md): Withdraw your client's open invitation. Its link stops working. Refused with `409 client_joined` once your client has joined the business. - [Create a verification link](https://docs.agentaos.ai/api-reference/businesses/verification-link.md): The identity check link for your client. You send it; only your client can complete it. Needs a live key: a test key gets `403 live_key_required`. While a check is open, calling again returns the same check. `url` is `null` when the client is already verified. For another app of your own company it… - [Get the fields a currency needs](https://docs.agentaos.ai/api-reference/bank-accounts/requirements.md): The form schema for a bank account in this currency. Render it, then send the answers to `POST /gateway/bank-accounts`. Works with a test or a live key. - [Refresh the fields after an answer](https://docs.agentaos.ai/api-reference/bank-accounts/refresh-requirements.md): Some answers change the fields that follow (a field marked `refreshRequirementsOnChange`, such as the legal type). Send the `quoteId` and the answers so far; the fields come back updated. - [Add a bank account](https://docs.agentaos.ai/api-reference/bank-accounts/create.md): Save a bank account for the business. Where the bank offers a name check, it runs at once: a clear mismatch is saved but never paid, and `payableReason` says so. Needs a live key. For a platform acting on a business it manages, bank accounts by API must have been opened for your platform; ask us. Ev… - [List bank accounts](https://docs.agentaos.ai/api-reference/bank-accounts/list.md): The active bank accounts of the business, thin references only, each with whether the next payout can go to it. - [Retire a bank account](https://docs.agentaos.ai/api-reference/bank-accounts/deactivate.md): The account stops being paid to. A currency that pointed at it falls back to the newest payable account. Needs a live key; the same platform rule as adding one. - [Webhooks](https://docs.agentaos.ai/api-reference/webhooks.md): How AgentaOS signs and delivers webhook events, and how to verify the X-AgentaOS-Signature header. - [Changelog](https://docs.agentaos.ai/changelog/overview.md): What's new in AgentaOS. ## OpenAPI Specs - [openapi](/openapi.json) ## Optional - [Support](mailto:contact@agentaos.ai) This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.