> For the complete documentation index, see [llms.txt](https://docs.startupstarterkits.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.startupstarterkits.com/ssk-pro-features/payments/index/chapter-1.md).

# Setting Up Your Stripe Account

Chapter 1: Setting Up Your Stripe Account

## **Step 1 - Create a Stripe Account**

1. **Sign Up**: Visit [Stripe](https://stripe.com) and sign up for an account if you don't already have one.
2. **Dashboard Access**: After setting up your account, log in to access the Stripe Dashboard.

## **Step 2 - Obtain API Keys**

1. **Navigate to API Keys**: In the Stripe Dashboard, go to **Developers** > **API keys**.
2. **Copy Keys**:
   * **Publishable Key**: Copy your Publishable Key.
   * **Secret Key**: Copy your Secret Key.
3. **Add to Environment Variables**: In your project's `.env` file, add the following:

   ```bash
   STRIPE_SECRET_KEY=sk_test_your_secret_key
   STRIPE_WEBHOOK_SECRET=whsec_your_webhook_secret
   ```

Replace your\_secret\_key, and your\_webhook\_secret with your actual keys.

## **Step 3 - Set Up Webhook Secret**

1. **Navigate to Webhooks**: In the Stripe Dashboard, go to Developers > Webhooks.
2. Add Endpoint:
   * Click on Add endpoint.
   * Enter your webhook endpoint URL (e.g., <https://yourdomain.com/api/webhook>).
3. Select Events:
   * Choose checkout.session.completed and any other events you want to handle.
4. Retrieve Webhook Secret:
   * After creating the endpoint, click to reveal the Signing Secret.
   * Add this to your .env file as STRIPE\_WEBHOOK\_SECRET.
