# 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.startupstarterkits.com/ssk-pro-features/payments/index/chapter-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
