> ## Documentation Index
> Fetch the complete documentation index at: https://dhiwisepvtltd-5e04e6a4.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Stripe

> Accept payments in your Rocket.new app with Stripe to handle one-time checkout, recurring subscriptions, and donation flows from a single prompt.

Connect Stripe and describe the payment flow you want in chat. Rocket generates the complete checkout experience: pricing pages, payment forms, webhook handlers, and subscription management.

## What you can do

> **SaaS subscription billing**
>
> Monthly or yearly plans with automatic billing, upgrades, downgrades, and cancellation.

> **One-time product checkout**
>
> Sell digital products, courses, templates, or physical goods with a simple checkout flow.

> **Accept donations**
>
> One-time or recurring donations with preset or custom amounts.

> **Multi-product checkout**
>
> Cart-based checkout with multiple line items, quantities, and a single Stripe payment session.

## Before you connect

You need your **Secret key** and **Publishable key** from the Stripe Dashboard.

> **Open your Stripe API keys in the Stripe Dashboard**
>
> [Open](https://dashboard.stripe.com/apikeys)

| Key type | Prefix | Usage |
| :- | :- | :- |
| **Publishable key** | `pk_` | Safe to use on the client side |
| **Secret key** | `sk_` | Server side only - keep this confidential |

Keys come in two modes. Always start with **Test keys** and switch to **Live keys** only when you are ready to accept real payments.

> [!WARNING]
>
> Never paste your Stripe keys directly into chat. Always use the secure connection popup. If your Secret key has been exposed, rotate it immediately from the [Stripe Dashboard](https://dashboard.stripe.com/apikeys).

> [!NOTE]
>
> Stripe works best paired with [Supabase](https://dhiwisepvtltd-5e04e6a4.mintlify.site/build/connectors/supabase/overview.md) for user accounts. Rocket links Stripe customers to authenticated Supabase users automatically.

## Connect Stripe

**Web Browser**

You can connect from two places - both open the same popup.

**Option 1: From chat**

Type a prompt that mentions Stripe - for example, `Connect Stripe and add a $49 one-time checkout`. Rocket detects the intent and shows a **Connect** button inline. Click it and the popup opens.

![Stripe connection prompt in the Rocket chat panel.](https://mintlify.s3.us-west-1.amazonaws.com/dhiwisepvtltd-5e04e6a4/images/build/connectors/stripe/web-browser/stripe-chat-light.webp)

![Stripe connection prompt in the Rocket chat panel.](https://mintlify.s3.us-west-1.amazonaws.com/dhiwisepvtltd-5e04e6a4/images/build/connectors/stripe/web-browser/stripe-chat-dark.webp)

Stripe connection prompt in chat

**Option 2: From the Connectors tab**

Click the **`...`** button in the preview toolbar, then select **Connectors**.

Open Connectors from the toolbar

Click the **Stripe** card, then click **Connect**.

![Connectors tab showing the Stripe card with a Connect button.](https://mintlify.s3.us-west-1.amazonaws.com/dhiwisepvtltd-5e04e6a4/images/build/connectors/stripe/web-browser/stripe-connectors-tab-light.webp)

![Connectors tab showing the Stripe card with a Connect button.](https://mintlify.s3.us-west-1.amazonaws.com/dhiwisepvtltd-5e04e6a4/images/build/connectors/stripe/web-browser/stripe-connectors-tab-dark.webp)

Stripe card in the Connectors panel

**After clicking Connect**

A popup opens. Paste your **Secret key** and **Publishable key**, then click **Save**. A green dot appears next to Stripe when the connection is active.

![Stripe API key input popup.](https://mintlify.s3.us-west-1.amazonaws.com/dhiwisepvtltd-5e04e6a4/images/build/connectors/stripe/web-browser/stripe-popup-light.webp)

![Stripe API key input popup.](https://mintlify.s3.us-west-1.amazonaws.com/dhiwisepvtltd-5e04e6a4/images/build/connectors/stripe/web-browser/stripe-popup-dark.webp)

Paste your Stripe keys in the popup

**Update or disconnect**

Go to [**Connectors > Stripe**](#connect-stripe). Update your keys or click **Disconnect** to remove the integration.

![Stripe integration showing connected state with a Disconnect button.](https://mintlify.s3.us-west-1.amazonaws.com/dhiwisepvtltd-5e04e6a4/images/build/connectors/stripe/web-browser/stripe-disconnect-light.webp)

![Stripe integration showing connected state with a Disconnect button.](https://mintlify.s3.us-west-1.amazonaws.com/dhiwisepvtltd-5e04e6a4/images/build/connectors/stripe/web-browser/stripe-disconnect-dark.webp)

Disconnect Stripe

**Mobile App**

You can connect from two places - both open the same popup.

**Option 1: From chat**

Type a prompt that mentions Stripe. Rocket detects the intent, shows a **Connect** button, and the popup opens when you tap it.

**Option 2: From the Connectors tab**

1. Tap the **More** button in the header.
2. Tap **Integrations**.
3. Tap the **Stripe** card, then tap **Connect**.

**After tapping Connect**

A popup opens. Paste your **Secret key** and **Publishable key**, then tap **Done**. A green dot appears next to Stripe when the connection is active.

**Update or disconnect**

Go to **Integrations > Stripe**. Update your keys or tap **Disconnect** to remove the integration.

## Example prompts

| Use case | Prompt |
| - | - |
| Simple checkout | `Add a Stripe checkout for my $49 product with a success page.` |
| Subscription plans | `Create a pricing page with Free, Pro ($19/mo), and Enterprise ($99/mo) tiers using Stripe.` |
| Donations | `Add Stripe donation buttons with $5, $10, $25, $50 options and a custom amount field.` |
| Free trial | `Add a 14-day free trial to the Pro plan. Charge $19/month after the trial ends.` |
| Invoices | `Generate and email a PDF invoice to the customer after each Stripe payment.` |
| Coupon codes | `Add a coupon code field to the checkout page that applies a Stripe discount.` |
| Refund flow UI | `Add a "View Orders" page with order history and a link to the Stripe customer portal.` |
| Usage-based billing | `Track API calls per user and charge $0.01 per call using Stripe metered billing.` |

## Tips

* **Always start with Test mode keys.** Switch to Live keys only when you are ready to accept real payments. Test card: `4242 4242 4242 4242`.
* **Connect Supabase first.** Rocket links Stripe customers to Supabase user accounts. Connect Supabase before connecting Stripe.
* **Webhooks are handled automatically.** Rocket sets up the necessary webhook handlers for events like `checkout.session.completed` and `customer.subscription.updated`.
* **Refunds and disputes live in Stripe.** Manage refunds, disputes, and financial reporting directly from the Stripe Dashboard.
* **One set of keys per task.** Each Rocket task connects to a single set of Stripe API keys. You can use the same Stripe account across multiple tasks.

## What's next?

> **[Supabase](https://dhiwisepvtltd-5e04e6a4.mintlify.site/build/connectors/supabase/overview.md)**
>
> Stripe requires Supabase for user accounts. Set it up if you have not already.

> **[Resend](https://dhiwisepvtltd-5e04e6a4.mintlify.site/build/connectors/resend.md)**
>
> Send order confirmation and receipt emails automatically after Stripe payments.

> **[Google Analytics](https://dhiwisepvtltd-5e04e6a4.mintlify.site/build/connectors/google-analytics.md)**
>
> Track checkout conversion rates and revenue with GA4 e-commerce events.

> **[Build a SaaS app](https://dhiwisepvtltd-5e04e6a4.mintlify.site/learn/recipes/saas.md)**
>
> Full recipe: Supabase + Stripe + Resend + Netlify to build a complete SaaS product.


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