Action integration
Stripe AI agent for payment links, invoices and refunds
Connect your own Stripe account so a Berrydesk agent can create payment links and invoices, find customers, refund charges and issue promo codes.
- Connects your own Stripe account
- Merchant tools and signed-in customer billing tools
- Retry-safe: repeated calls reuse the same request key
What the Stripe integration does
Billing questions are some of the most expensive to answer by hand: someone has to find the customer, open the invoice, check the charge and sometimes move money. The Stripe integration lets a Berrydesk agent do the routine parts of that inside a chat, against your own Stripe account.
It comes in two groups. Merchant tools are for your team's side of the work: create a payment link, send an invoice, look up a customer, refund a charge, make a promo code. Customer billing tools are for the signed-in customer: read their subscription, invoices and payment methods, and change or cancel a plan. They are separate actions, and you add only the ones you want.
Merchant tools
| Action | What it does |
|---|---|
| Create Payment Link | Makes a Stripe Payment Link for a price you already have in Stripe, with a quantity, and returns the URL. |
| Create + Send Invoice | Finds or creates the customer by email, adds one or more line items, finalizes the invoice and emails it. |
| Search Customer | Finds customers by email, name or phone and returns up to five matches, so the agent can confirm the right person. |
| Create Refund | Refunds a charge or payment intent, in full or in part, with a reason of duplicate, fraudulent or requested by customer. |
| Create Discount Code | Creates a Stripe promotion code with a new coupon: percent or amount off, once, repeating or forever, with a redemption cap and expiry. |
Customer billing tools
The customer billing actions are Get Subscription Info, Get Invoice History, Get Payment Methods, Manage Subscription (upgrade, downgrade or cancel), Change Billing Info, and Add/Update Payment Method through Stripe Checkout. They act on one specific Stripe customer.
That customer comes from a signed identity token your site passes to the chat, which carries the customer's Stripe customer ID. If a visitor is not identified, these tools are not offered to the agent at all. Plans the agent may switch between, and whether a cancellation ends immediately or at period end, are set in the Manage Subscription action's settings.
Example: a refund request
Customer: "I was charged twice for the same order on the 14th." The agent calls Search Customer with the email, reads back the matching customer to confirm it is the right person, and finds the duplicate. Before it refunds anything, your guideline says to confirm the amount with the customer: "I can refund the second charge of $48.00. Want me to go ahead?" On yes, it calls Create Refund with reason duplicate.
Berrydesk does not enforce a confirmation step in code, so put it in a guideline. The refund action's own description tells the model to confirm first, but a written rule is what you can test and audit.
Retries are handled for you. Each Stripe write carries an idempotency key derived from the conversation and turn, so if a network timeout makes the agent retry the same call, Stripe returns the first result instead of refunding twice. Our guide on refund timeouts explains why that matters.
How to set it up
- 1
Connect Stripe
In Settings, then Integrations, find Stripe under E-Commerce & Payments and choose Connect with Stripe. You sign in to Stripe and authorize the connection to your own account.
- 2
Pick the actions
On the agent's Actions page choose Create action and select from Stripe, customer billing or Stripe, merchant tools. Start with read-only ones such as Search Customer.
- 3
Add guidelines for money
Write the rules the agent must follow before any write: confirm the amount, cap the refund size, send anything unusual to a person.
- 4
Pass customer identity if you use billing tools
For the customer billing actions, have your site pass a signed identity token that includes the customer's Stripe customer ID.
- 5
Test with small amounts
Run a payment link, an invoice and a refund for a few dollars on your own test customer before you point the agent at real customers.
Limits you should know about
- The connection uses Stripe Connect with read and write access to the account you authorize. It is not a read-only key, so treat the write actions with care.
- Create Payment Link needs a Price ID that already exists in Stripe. The agent cannot create products or prices.
- There is no dispute, payout, tax or balance action.
- Berrydesk does not react to events in your Stripe account. A failed payment does not start a conversation; the agent acts only inside a chat.
- The agent does not decide who is allowed to ask for a refund. Your guidelines do. Without one, a convincing customer can ask for one.
- Stripe's own fees and rules apply to every payment, refund and invoice.
Frequently asked questions
Does Berrydesk use my Stripe account or its own?
Yours. You authorize a Stripe Connect connection to your account, and the merchant tools act on your customers, charges and invoices. Berrydesk's own subscription billing is a separate Stripe setup and does not touch your account.
Can the agent issue refunds without a human approving?
It can, if you add the Create Refund action and no guideline stops it. The action is off until you add it, and there is no built-in approval step, so write a guideline that requires confirmation and a maximum amount, or route refunds to a teammate.
Why are the customer billing tools missing in my chat?
They need an identified customer with a Stripe customer ID, passed to the chat in a signed identity token from your site. For anonymous visitors those tools are not offered, by design.
What stops a refund from running twice?
Each Stripe write call includes an idempotency key built from the conversation and turn. A retry of the same call gets Stripe's original response rather than a second refund.
Can the agent create products or prices?
No. Payment links need a Price ID that already exists, and invoices use ad hoc line items you describe in the call. Product and price setup stays in Stripe.
Build your Berrydesk agent
Train an agent on your own content, connect your channels and pay only for the messages it sends. New accounts start with $1.00 in free credits.