# Connect Stripe

Once Stripe is connected, your team sees a customer's subscriptions, invoices and payments in the conversation. Rin and your AI agents can look them up too, and can ask for a payment refund or a subscription cancellation, which a teammate approves first.

Rinhelp connects with a restricted key: a Stripe key that only allows what Rinhelp needs. An owner does this under **Settings > Integrations**, in the **Stripe** section.

## Connect Stripe

To try it first, make the key in Stripe's test mode, where payments aren't real.

1. Open [API keys](https://dashboard.stripe.com/apikeys) in Stripe.
2. Click **Create restricted key** and name it Rinhelp.
3. Set these permissions:
   - **Customers**, **Charges**, **Invoices** and **PaymentIntents**: **Read**.
   - **Refunds** and **Subscriptions**: **Write**.
4. Click **Create key**, then copy the key. It starts with `rk_`.
5. In Rinhelp, paste it under **Restricted key** and click **Connect Stripe**.

Rinhelp only accepts a key that starts with `rk_`, and tests it with Stripe before saving it. If Stripe doesn't accept it, Rinhelp says so. Your key is stored encrypted.

Once connected, the **Stripe** section says whether the key is in test mode or live mode. To switch from test mode to real payments, or to replace a key, make a new key, click **Replace key**, paste it and click **Connect Stripe**.

To stop access, click **Disconnect** and confirm. Rinhelp deletes the key, and Rin and your team can no longer look up payments until an owner connects Stripe again. You can also delete the key in Stripe.

## Look up a customer

With Stripe connected, a **Stripe** section appears in every conversation's details. Click it to open it.

- Click **Find the customer in Stripe** to find the customer by their email.
- Or type an email, a customer ID that starts with `cus_`, or an invoice or receipt number, and click **Find**.

Each customer shows:

- their subscriptions, with the price, status and renewal or end date,
- their latest invoices, with the number, total, status and date, and
- their latest payments, with the amount, status, date, the amount refunded so far and a link to the receipt.

## What Rin does with payments

Rin never shares a purchase just because someone asks. A customer has to pass the purchase check: they give an invoice or receipt number and the email on it, and both must match. A signed-in customer passes it for their own payments, especially if your website passes their Stripe customer ID. See [Set up the chat widget](/articles/ea9750a9-598e-439a-a790-c97b0f459446).

If a customer wants a refund or to cancel a subscription, Rin tells them what it will ask for and asks them to confirm. Then it files the request and hands the conversation to your team. Rin can't refund or cancel anything itself.

## Refunds and cancellations

A teammate can refund a payment or cancel a subscription from the conversation's details: look up the customer, then click **Refund** on a payment or **Cancel** on a subscription. Rinhelp asks for a reason, and for a refund the amount, then it happens at once. The lookup then shows the result.

Refunding or canceling moves money or can't be undone, so when Rin or an AI agent asks, it becomes an approval that waits for a teammate to approve or reject it, in the conversation or on the approval page. See [Approve actions](/articles/8f2f786e-14b7-4787-a72d-4a7d2e7f1f1a).

- A **refund** is for one payment, in full or for an amount you choose, up to what hasn't been refunded yet.
- A **subscription cancellation** takes effect at the end of the current period, so the subscription doesn't renew and the customer keeps what they've paid for until then.
