> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.nozle.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Stripe

> Stripe integration for checkout and payments

Nozle uses Stripe for payment processing, embedded checkout, and subscription management.

## Setup

Nozle connects to Stripe via your secret key. Configure it in your environment:

```
STRIPE_SECRET_KEY=sk_live_...
STRIPE_WEBHOOK_SECRET=whsec_...
```

## What Nozle handles

| Feature           | How it works                                           |
| ----------------- | ------------------------------------------------------ |
| **Checkout**      | Embedded Stripe checkout via setup mode                |
| **Subscriptions** | Created and managed through Nozle, synced to Stripe    |
| **Invoices**      | Generated by Nozle, payment collected via Stripe       |
| **Webhooks**      | Nozle listens for Stripe events to sync payment status |

## Checkout flow

1. Customer selects a plan in your app (via React SDK or API)
2. Nozle creates a Stripe Checkout Session in setup mode
3. Customer enters payment details in the embedded checkout
4. On completion, Nozle creates the subscription and attaches the payment method
