# Store Payments

### Configure Payment Gateway for Credit/Debit Card Payments

As an admin, you can configure a payment gateway to allow investors to purchase tokens using credit or debit cards. Currently, the Spydra platform supports Stripe as the third-party payment provider. Follow these steps to set up Stripe as your payment gateway:

#### Steps to Configure Stripe Payment Gateway

1. **Access Store Settings:**
   * Navigate to your store's **Settings** page from the main dashboard.
   * Click on the **Payment** tab.
2. **Add Payment Provider:**
   * Click on the **‘Add Third Party Provider’** button.
   * From the dropdown menu, select **Stripe** as the payment gateway provider.
3. **Enter Stripe Details:**
   * You will need to provide the following details:
     * **Secret Key:** This is used to authenticate API requests from Spydra to your Stripe account.
     * **Webhook Secret:** This is required to securely receive event notifications from Stripe.
4. **Save Configuration:**
   * After entering the **Secret Key** and **Webhook Signing Secret**, click **Save** to complete the configuration.

<mark style="color:blue;">**Where to Find the Secret Key in Your Stripe Account?**</mark>

* Log in to your Stripe account.
* Navigate to the **Developers** section in the left-hand menu.
* Click on **API Keys**.
* Copy the **Secret Key** from the list of API keys. Use the live key for production environments or the test key for development purposes.

<mark style="color:blue;">**How to Configure the Webhook Signing Secret?**</mark>

* In your Stripe dashboard, navigate to the **Developers** section and select **Webhooks**.
* Click on **Add Endpoint** to create a new webhook.
* In the **Endpoint URL** field, enter the following webhook: \
  <https://rwa-controlplane.spdr.club/api/v/1/checkout/stripe-webhooks>
* Select the specific events to listen for. Kindly include events such as:

  <figure><img src="https://640808362-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5jDaQI2dLzXe5VgQBNFE%2Fuploads%2FIPtxzhQY0ayknfbVqnGk%2FScreenshot%202025-04-11%20at%203.26.51%20PM.png?alt=media&#x26;token=1cab118d-dc64-4628-bfa1-fa6180aea31e" alt=""><figcaption></figcaption></figure>

<figure><img src="https://640808362-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5jDaQI2dLzXe5VgQBNFE%2Fuploads%2F591Y58zcqZzPaAgp95Av%2FScreenshot%202025-04-11%20at%203.27.05%20PM.png?alt=media&#x26;token=c7f7a39c-a7a3-4c4c-88bd-3b73f2f355f4" alt=""><figcaption></figcaption></figure>

* Once the webhook is created, Stripe will generate a Webhook Signing Secret. Copy this secret and add it to the **Webhook Secret** field in Spydra.

#### Important Notes:

* Ensure that you are using the correct keys (test or live) based on the environment you are working in.
* Double-check the webhook URL and ensure it matches the one provided by Spydra.
