Fondoo

How to connect Stripe to your AI agent safely

Giving an agent your Stripe secret key is a bad idea. Here's a safer setup: the agent builds your catalog and checkout, and you keep every money decision.

Fondoo team avatar: Fondi the fondue pot Fondoo team · 6 min read Integrations
Two founders and Mallow plugging cables into a chocolate socket board

TL;DR

  • Don't paste a full Stripe secret key into an AI chat. Give the agent narrow operations instead of raw API access.
  • In Fondoo, agents can create products, prices and checkout links. They can't refund, pay out, transfer money or answer disputes. Those operations don't exist for agents.
  • Anything that spends money or changes live prices waits for an owner approval. Spending caps are set by a human and can't be raised by an agent.
  • Payments run on Stripe Connect with direct charges: your customers pay your connected account, you get the full Stripe Dashboard, and Fondoo takes a 1% platform fee.

An AI agent that can set up your pricing page and checkout saves hours. An agent holding a Stripe key with write access to everything is a different story. Prompt injection, a misread instruction or a looping retry can all turn into real charges or refunds.

The fix isn't to keep agents away from payments. It's to give them a smaller, safer surface. Here's how that works in Fondoo, and what you can copy even if you build your own setup.

The four rules

  1. Agents get operations, not keys. The agent calls named operations like upsert_product and create_checkout_link. It never sees a Stripe secret.
  2. Money never moves on an agent's say-so. There are no agent operations for refunds, payouts, transfers or dispute responses.
  3. Money-level changes wait for a human. Live price changes, purchases and other risky writes create an approval request.
  4. Every call is previewable and logged. Any write can run as a dry run first, and everything lands in an audit log.

Step 1: Onboard Stripe as a human

The agent calls:

get_stripe_onboarding_link({ siteId, mode: "live", email: "you@yourbusiness.com", country: "US",
  refreshUrl: "https://getfondoo.com/settings/payments", returnUrl: "https://getfondoo.com/settings/payments" })

This creates a Stripe connected account (Accounts v2) and returns a Stripe-hosted onboarding link. You open it and complete identity verification and bank details. KYC, typing card numbers, OAuth consent and setting spending caps are deliberately human-only in Fondoo. An agent can see their status and ask you to do them. It can't do them for you.

get_payments_status and get_stripe_status let the agent check whether your account can accept charges yet, and explain what's left.

Step 2: Understand the Connect setup

Fondoo uses Stripe Connect with direct charges:

  • The charge is created on your connected account. You're the merchant; the customer's card statement shows your business.
  • Your account gets the full Stripe Dashboard, so you can see payments, issue refunds and handle disputes yourself.
  • Stripe collects its processing fees from your account and Stripe handles negative balances, rather than Fondoo standing in between.
  • Fondoo adds a 1% application fee to each checkout. That's the only cut. There's no revenue share.

Why this matters for agent safety: your money sits in your own Stripe account, under your control. Fondoo never holds your balance, and no Fondoo operation can pay it out.

Already have a Stripe account?

Two other options, both owner-only:

  • configure_payment_provider connects your own writable Stripe account directly. Credentials are encrypted and the account identity is verified. In direct mode, checkout runs on your account without a Fondoo application fee.
  • connect_existing_stripe_readonly takes a restricted key (rk_live_…) and a webhook signing secret, for revenue tracking only. Fondoo reads payments for attribution and reports, and can't change anything in your account.

If you go the restricted-key route, follow Stripe's advice: one key per service, minimum permissions, stored in a secret manager.

Step 3: Let the agent build the catalog

Now the agent can do the tedious part:

upsert_product({ siteId, mode: "test", name: "Pro", plan: "pro", kind: "subscription",
  price: { amount: 1900, currency: "usd", interval: "month", trialDays: 7 } })

create_checkout_link({ siteId, mode: "test", priceId,
  successUrl: "https://yourapp.com/welcome", cancelUrl: "https://yourapp.com/pricing" })

Products can be subscriptions, one-time purchases, digital downloads, license keys or physical goods with simple shipping. create_checkout_link creates a hosted Stripe Checkout session. Creating it doesn't charge anyone; the customer does that by paying.

Start in test mode. When you switch to mode: "live", live product and price changes from an agent don't execute immediately. They come back as:

{ "status": "pending_approval", "approvalId": "…", "approvalUrl": "https://…" }

You open the link, see the exact operation and arguments, and approve or reject it. Approval is enforced by Fondoo itself, independent of whatever confirmation your chat client shows. Prices in Stripe are immutable, so a change creates a new price and retires the old one; history is kept.

Step 4: Set spending caps

Some operations cost money directly, like buying a domain with buy_domain. Those are bounded twice:

  • Per call: buy_domain requires a maxAmount, so the agent states the most it's allowed to pay.
  • Per workspace: you set a spending cap and an auto-approve limit with set_spending_cap and set_auto_approve_limit. Both are owner-only. Agents can't change spending settings.

When an agent hits the cap, the purchase stops and you get an approval link. If you use Fondoo from ChatGPT, purchases always go through an approval page on getfondoo.com rather than completing in the chat.

Step 5: Preview first, then check the log

Every write operation accepts a dry run. Ask your agent to "preview first" and it gets back what would happen, with the risk level, without doing it. That's a good habit for anything live.

Afterwards, get_audit_log shows who called what, with which risk level and outcome, including approvals and rejections. list_approvals shows what's waiting on you.

What agents can and can't do

Agents canAgents can't
Create and update products and prices (live changes need approval)Refund a payment
Create checkout links and pricing sectionsPay out or transfer your balance
Create couponsRespond to disputes
Read orders (customer emails are masked)Change spending caps
Sync paid access into your app's databaseComplete Stripe identity verification
Request purchases within your capApprove their own requests

When a customer asks for a refund through support, the ticket goes to a human, with a "Handle in Stripe" button. The Lovable guide shows the full make-it-paid flow on top of this setup.

If you're building this yourself

Even without Fondoo, the same pattern holds up:

  • Use restricted keys with the smallest set of Stripe permissions you need.
  • Wrap Stripe calls in your own named tools and never expose a generic "call the Stripe API" tool to an agent.
  • Classify each tool by risk and require a human for anything that spends, deletes or changes live prices.
  • Verify webhook signatures and deduplicate events by ID.
  • Log every call with the actor and outcome.

FAQ

Can a prompt injection make the agent refund or pay out money?

Not through Fondoo. Refunds, payouts, transfers and dispute responses aren't available as agent operations. The worst an agent can do with money-level operations is create an approval request that you reject.

Who is the merchant of record?

You are. With direct charges, payments are created on your connected Stripe account, and Stripe's fees come from your account.

What does Fondoo charge on payments?

A 1% platform fee on Fondoo checkout, plus Stripe's normal processing fees. The plan itself is $24/site/month after a 7-day trial. See /pricing.

Can I see payments in my own Stripe Dashboard?

Yes. Connected accounts get the full Stripe Dashboard, so refunds, disputes and payouts are all managed there by you.

Does the agent ever see my Stripe keys?

No. Keys are added through owner-only operations or a secure paste link, stored encrypted and never returned by any operation.


Want to let your agent set up checkout without handing over the keys? Start your 7-day trial for $0.

All posts

Get the next guide by email

New posts from the Fondoo blog, sent when we publish: guides, integrations and product updates.

We only send new posts and product news, never anything else. Every email has a one-click unsubscribe link.

Mallow the marshmallow mascot holding a letter