> ## Documentation Index
> Fetch the complete documentation index at: https://docs.min-ai.ar/llms.txt
> Use this file to discover all available pages before exploring further.

# Stripe

> Your agent keeps track of your Stripe customers, subscriptions and payments, tells you what matters and refunds or cancels only if you allow it and with your OK.

<img src="https://mintcdn.com/min-ai/EQr5ljJyas4JWh5G/images/plugins/stripe.png?fit=max&auto=format&n=EQr5ljJyas4JWh5G&q=85&s=67a7c1339184de43a2b0dfe8090b4e29" alt="" width="56" height="56" noZoom style={{ borderRadius: '14px' }} data-path="images/plugins/stripe.png" />

With Stripe, your agent tells you how your business is doing: how many trials converted, who canceled, which payments failed and how much you collected. It tells you what matters as it happens and, if you want, sends you a report every week. Refunding or canceling happens only if you turn on the permission, and with your OK.

| | |
| - | - |
| **Category** | Finance |
| **For** | Personal and group agents (for example, your team's agent) |
| **What it asks for** | A Stripe restricted key and, if you want notices as it happens, a webhook |
| **How it connects** | With one-time links your agent sends you |

## What it can do

<CardGroup cols={2}>
  <Card title="Look up" icon="magnifying-glass">
    A customer and their subscriptions (with trials) and invoices; find customers; subscriptions, invoices, payments (failed ones too), refunds, prices and your balance. And a **report for a period**: sign-ups, trials converted, expired or canceled, paid cancellations, revenue and refunds.
  </Card>

  <Card title="Change, with your OK" icon="rotate-left">
    Refund a payment (in full or in part) and cancel a subscription (at the end of the period or right away). It needs the permission on.
  </Card>
</CardGroup>

### Notices as it happens

With the webhook set up, your agent tells you only what's worth it, in one line (who, which plan, how much). By default: a trial turning paid, a new paid subscription, a failed payment and a dispute. It can also tell you about paid cancellations and refunds: just say so in the chat.

### Weekly report

Stripe comes with a schedule to send you a report. It starts off: you agree on it with your agent (for example, "Mondays at 9") and it sets it up.

## How it connects

<Steps>
  <Step title="Add it to an agent">
    From **Plugins → Stripe → Add to an agent**, or ask your agent in the chat. See [Add a plugin](/en/tools/add-a-plugin).
  </Step>

  <Step title="Create a restricted key">
    A restricted key can only do what you tick. Open [dashboard.stripe.com/apikeys](https://dashboard.stripe.com/apikeys) → **Create restricted key** and name it **minai**. Tick **Read** on Customers, Subscriptions, Invoices, Charges, Refunds, Prices, Products and Balance; everything else, no access. If you want it to be able to refund and cancel, tick **Write** on Refunds and Subscriptions. Create it and copy it: it starts with **rk\_live\_**.
  </Step>

  <Step title="Paste it in your agent's link">
    Your agent sends you a one-time link for the key. Paste it there, not in the chat. See [Keys and values](/en/tools/keys-and-values).
  </Step>

  <Step title="Notices as it happens (optional)">
    Your agent gives you its webhook's address. At [dashboard.stripe.com/webhooks](https://dashboard.stripe.com/webhooks), tap **Add destination**, pick these events: customer.subscription.created, customer.subscription.updated, customer.subscription.deleted, invoice.payment\_failed, charge.dispute.created and charge.refunded; and as the destination, that address. Copy the **Signing secret** (it starts with **whsec\_**) and paste it in the link your agent sends you.
  </Step>

  <Step title="Your agent confirms">
    It checks that everything works and tells you in the chat what it can do.
  </Step>
</Steps>

<Tip>
  To cut off its access, delete the key in Stripe.
</Tip>

## The permission

On the Stripe card, in the agent's **Plugins** tab, there's the **Allow changes** switch: “Refund payments and cancel subscriptions, always with your OK. Off, it only looks.”

It starts off and only you change it. minai's servers enforce the limit: your agent can't get around it. See [Permissions](/en/tools/permissions).

<Warning>
  A refund goes back to the customer's card and can't be undone. Canceling a subscription cuts off their service. Check every preview before confirming.
</Warning>

## How it looks out for you

* **Nothing changes without your OK.** Before refunding or canceling, it shows you which payment or subscription and how much, with the **Confirm** and **Change** buttons. It only goes ahead with your yes, and that OK is for that exact operation.
* If a change fails, it checks what happened before retrying.
* It never writes to your customers on its own.
* Your agent never sees your key: minai's servers add it on each request.
* Your customers' data: only what's needed for what you asked.

## Things to ask it

* "How many trials converted this week?"
* "Give me September's report: sign-ups, cancellations and revenue."
* "What's up with the customer [maria@empresa.com](mailto:maria@empresa.com)? Are they up to date?"
* "Which payments failed in the last 7 days?"
* "Refund [juan@x.com](mailto:juan@x.com)'s last payment."
* "Send me the report every Monday at 9."

## Limits

* If the key can't read something, your agent tells you "permission denied": add **Read** for it in Stripe.
* Notices as it happens only start once you've entered the webhook's secret.
* It converts Stripe's times to your time zone.

## If you remove it

Your agent loses access in less than a minute and confirms it. The key and the secret are deleted from minai with the plugin; to close it off completely, also delete the key (and the webhook) in Stripe. See [Remove a plugin](/en/tools/remove-a-plugin).

<CardGroup cols={2}>
  <Card title="Mercado Pago" icon="https://mintcdn.com/min-ai/EQr5ljJyas4JWh5G/images/plugins/mercadopago.png?fit=max&auto=format&n=EQr5ljJyas4JWh5G&q=85&s=96c820f26407f53199f6c9b1aa8a3f45" href="/en/plugins/mercado-pago" width="128" height="128" data-path="images/plugins/mercadopago.png">
    Your Mercado Pago account, with your OK to move money.
  </Card>

  <Card title="Permissions" icon="shield-halved" href="/en/tools/permissions">
    Each plugin's switches and what they unlock.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.