Connect your own Stripe account to Fondoo (direct mode)
Direct mode lets Fondoo sell through a Stripe account you already own, using a key you create. There is no Stripe Connect account and no Fondoo application fee on these checkouts. Your AI agent can still manage products, prices, coupons and checkout links, and buyers pay straight into your account.
If you are new to Stripe, the simpler option is the Fondoo-managed stripe setup. If you only want Fondoo to read your sales, use stripe_revenue.
What Fondoo can do with it
After you connect your key, Fondoo uses the same payment operations as the managed setup, but against your own account:
- Catalog: create and update products (
upsert_product), add prices (upsert_price, prices can't be edited in Stripe, so a change creates a new one), create percentage coupons (create_coupon), list and archive products (list_products,archive_product). - Checkout: create Stripe-hosted Checkout links (
create_checkout_link) and pricing blocks on your pages (add_pricing_block). Creating a link never charges anyone. - Customers: customer portal links (
get_customer_portal_link) and automatic tax (configure_payment_tax, once Stripe Tax is active in your account). - Status:
get_payments_statusshows the connected account and whether charges are enabled.
Your existing Stripe Payment Links, invoices and subscriptions are left alone. Fondoo only touches objects it creates.
What needs your approval: connecting the key is an owner-only action. Agent changes to live products, prices and coupons need your approval. Agents cannot refund, pay out or answer disputes. Do those in the Stripe Dashboard.
Fees: you pay Stripe's normal fees (Stripe pricing). In direct mode Fondoo does not attach a Stripe application fee to checkouts.
Before you start
- A Stripe account that is activated for live payments, if you want live mode. Sign in at dashboard.stripe.com.
- A paid Fondoo plan for live mode. Test mode works on any plan.
- Owner access to the Fondoo workspace. Only the owner can connect a payment key.
- One key per mode. A test key (
rk_test_orsk_test_) connects test mode. A live key (rk_live_orsk_live_) connects live mode. Fondoo rejects a key whose mode doesn't match.
Step by step: get your credentials
Use a restricted key. It limits what the key can do if it ever leaks (Stripe restricted keys).
- Sign in to Stripe. Choose sandbox (for test mode) or live mode with the switch on the API keys page.
- Go to the API keys page: https://dashboard.stripe.com/apikeys. You can also reach it from Developers → Workbench → Overview → API keys → Manage.
- Click Create restricted key. If Stripe offers preset permissions, you can skip them and set each permission yourself.
- Enter a Key name, for example
Fondoo direct. - Set these permissions. Every resource starts at None. Write also lets the key read.
- Write: Products, Prices, Coupons, Checkout Sessions, Customer portal.
- Read: Customers, Subscriptions, Invoices (and Invoice payments, if listed), Tax settings.
- Read: Accounts (the "Direct" account permission). Fondoo reads your own account once to check the key belongs to you. Stripe's labels in this editor can change. If a label is missing, search the permissions reference for
connected_account_read.
- Click Create key and complete two-step verification.
- Copy the key now. In live mode Stripe shows a key you create only once. Store it in your password manager until you paste it into Fondoo.
Connect it in Fondoo
Direct mode is connected with the owner-only operation configure_payment_provider. It takes the key itself, so run it in a place you control. Avoid pasting a live key into a chat where it will be stored in the history.
In the dashboard
There is no direct-mode form in the Fondoo dashboard today. On Connections, find Stripe under Payments and click Connect Stripe for the steps. Then run the call below yourself, or ask your agent with an owner key.
By asking your agent
Example prompt (owner session):
Connect my own Stripe account to my store site in test mode. I'll give you the restricted key.
The agent calls:
configure_payment_provider({ siteId: "<site id>", mode: "test", secretKey: "rk_test_..." })Fondoo checks the key mode, reads your Stripe account to confirm it, encrypts the key and switches the site's payment provider to stripe_direct. The response shows configured: true and your Stripe accountId.
For instructions only, connect_service({provider:"stripe_direct", siteId}) returns a signed help link valid for 15 minutes. add_connection_key and test_connection are not used for this provider.
Over REST:
POST https://api.getfondoo.com/v1/ops/configure_payment_provider
Authorization: Bearer <your Fondoo owner API key>
Content-Type: application/json
{"siteId":"<site id>","mode":"test","secretKey":"rk_test_..."}Use the same call with mode:"live" and a live key when you are ready.
Webhooks
Stripe tells Fondoo about paid checkouts and subscription changes through webhooks. For direct mode, Fondoo accepts these only on self-hosted Fondoo. There, the operator creates a Stripe webhook endpoint for https://<your Fondoo API host>/webhooks/stripe/direct/<siteId>/<mode> and adds its whsec_ signing secret to STRIPE_DIRECT_WEBHOOK_SECRETS. Subscribe to: checkout.session.completed, checkout.session.async_payment_succeeded, invoice.paid, invoice.payment_failed, customer.subscription.updated, customer.subscription.deleted, charge.refunded and charge.dispute.created. Stripe signs each event with the Stripe-Signature header, and Fondoo verifies it before reading anything (Stripe webhooks).
On hosted Fondoo there is no owner setting for a direct-mode signing secret. Orders and subscriptions from direct checkouts may not be recorded automatically. This may differ for your account. If you need automatic order tracking on hosted Fondoo, use the managed stripe option, or ask Fondoo support.
Test that it works
- Ask your agent: "Check my payments status for test mode." It calls
get_payments_status({siteId, mode:"test"}). Look forconnected: trueandchargesEnabled: true. - Create a test product with a price (
upsert_product), then a checkout link (create_checkout_link). - Open the link and pay with a Stripe test card such as
4242 4242 4242 4242(Stripe testing). - Check the payment in your Stripe Dashboard (sandbox view).
Troubleshooting
- "Stripe key mode mismatch; prefer a restricted key". The key's mode doesn't match
mode. Userk_test_/sk_test_withtest, andrk_live_/sk_live_withlive. - "Live payments require a paid workspace plan". Upgrade Fondoo, or connect test mode first.
- A Stripe permission error naming a permission. The restricted key is missing a permission. Stripe's error says which one. Edit the key in Stripe, or create a new key with that permission and connect again.
chargesEnabledis false. Your Stripe account isn't activated for payments yet. Finish activation in the Stripe Dashboard.- Forbidden / owner required. Only the workspace owner (or an owner API key) can run
configure_payment_provider. - 429 errors from Stripe. You hit Stripe's rate limit (about 100 requests per second live, 25 in sandboxes). Wait and retry (Stripe rate limits).
Limits, data and security
- What Fondoo stores: your key, encrypted, plus your Stripe account ID and mode. The key is never shown again. Fondoo also stores the products, prices and checkouts it creates.
- Rotate the key: in Stripe, open the key's ⋯ menu and choose Rotate key. Pick an expiration so the old key keeps working while you switch (up to 7 days). Then run
configure_payment_provideragain with the new key (Stripe API keys). - Revoke access: in Stripe, use ⋯ → Expire key. Fondoo can no longer act on your account. To switch the site back to Fondoo-managed payments, the owner can run
set_provider({siteId, capability:"payments", provider:"stripe"}).
Official links
- API keys: https://docs.stripe.com/keys
- Restricted keys: https://docs.stripe.com/keys/restricted-api-keys
- Permissions reference: https://docs.stripe.com/keys/permissions-reference
- Sandboxes: https://docs.stripe.com/sandboxes
- Webhooks: https://docs.stripe.com/webhooks
- Testing: https://docs.stripe.com/testing
- Payment Links: https://docs.stripe.com/payment-links
