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

# Stripe Integration for Paid Submissions

> Connect your Stripe Account to your directory to start accepting paid submissions and earn money with your directory.

This guide will walk you through integrating Stripe with your directory to accept paid submissions. The setup process has been streamlined - you only need a Stripe Restricted Key, and everything else (webhook creation, product syncing) happens automatically.

<Info>
  **What's New?** The integration process is now fully automated. Simply provide your Stripe Restricted Key, and the system will:

  * Create and configure webhooks automatically
  * Pull your products and prices automatically
  * Handle all the technical setup for you

  No more manual webhook configuration or copying multiple keys!
</Info>

## 1. Enable Paid Submissions

1. Navigate to the **Settings** section of your directory.
2. Go to **Paid Submissions**.
3. Enable **Paid Submissions** and select **Stripe** as the payment provider.

## 2. Create a Stripe Restricted Key

To integrate Stripe securely, you need to create a Restricted Key with specific permissions.

### Quick Setup (Recommended)

Click the button below to create a pre-configured Restricted Key with all required permissions:

**[Create Restricted Key in Stripe →](https://dashboard.stripe.com/apikeys/create?name=Directify%20Paid%20Submissions\&permissions%5B%5D=rak_product_read\&permissions%5B%5D=rak_price_read\&permissions%5B%5D=rak_plan_read\&permissions%5B%5D=rak_checkout_session_write\&permissions%5B%5D=rak_customer_write\&permissions%5B%5D=rak_webhook_write)**

This link will:

* Pre-fill the key name as "Directify Paid Submissions"
* Automatically select all required permissions
* Take you directly to the Stripe key creation page

### Manual Setup (Alternative)

If you prefer to create the key manually:

1. Log in to your **Stripe Dashboard**.

2. Navigate to **Developers** > **API Keys**.

3. Click **Create restricted key**.

4. Name your key (e.g., "Directify Paid Submissions").

5. Configure the following permissions:

   **Required Permissions:**

   * **Products**: Read
   * **Prices**: Read
   * **Plans**: Read
   * **Checkout Sessions**: Write
   * **Customers**: Write
   * **Webhooks**: Write

6. Click **Create key** and copy the generated restricted key.

<Note>
  The restricted key will look like `rk_live_...` for production or `rk_test_...` for testing.
</Note>

## 3. Connect Your Stripe Account

1. In your directory's **Paid Submissions** settings, paste the **Restricted Key** into the designated field.
2. The **Webhook URL** is automatically displayed - you don't need to manually configure it.
3. Click **Verify Credentials and Pull Plans**.

### What Happens Automatically

When you verify your credentials, the system will:

* ✅ Validate your Stripe restricted key
* ✅ Automatically create a webhook endpoint in your Stripe account
* ✅ Configure the webhook with the required events:
  * `customer.subscription.created`
  * `customer.subscription.updated`
  * `customer.subscription.deleted`
  * `customer.created`
  * `checkout.session.completed`
* ✅ Store the webhook secret securely
* ✅ Pull all active products and prices from your Stripe account

<Info>
  No manual webhook configuration needed! The webhook is created and configured automatically.
</Info>

## 4. Create Payment Plans in Stripe

Before syncing, make sure you have products set up in Stripe:

1. Navigate to **Products** in your Stripe dashboard.
2. Create products for your submission plans:
   * **Subscription Plans**: Monthly, Yearly, etc.
   * **One-Time Payment Plans**: Single submission fee
3. Ensure products are marked as **Active**.
4. Add pricing for each product.

<Tip>
  You can create multiple price points for the same product (e.g., monthly and yearly pricing).
</Tip>

## 5. Customize Your Plans

After pulling plans from Stripe, you can customize how they appear to users:

1. Review the imported plans in your directory settings.
2. For each plan, you can:
   * Edit the **description**
   * Customize **button text**
   * Add **features** to display
   * Mark plans as **bestseller**
   * Add **text below button**
   * Hide plans you don't want to offer
3. Click **Save** to finalize your configuration.

## 6. User Experience for Paid Submissions

Once configured, users can submit paid listings to your directory:

1. A user submits their content to the directory.
2. They are directed to the **submission dashboard**.
3. They click **Pay and Submit for Review**.
4. Available **plans** (subscription or one-time payments) are displayed.
5. The user selects a plan and completes payment via Stripe's secure checkout.
6. Upon successful payment, their submission is processed for review.

## Test Mode vs Live Mode

<Warning>
  If you use a test restricted key (`rk_test_...`), you'll see a **Test Mode** warning in your settings. Make sure to switch to your live restricted key (`rk_live_...`) when you're ready to accept real payments.
</Warning>

## Troubleshooting

### Webhook Issues

If webhooks aren't working:

1. Check that the webhook endpoint was created successfully in your Stripe Dashboard under **Developers** > **Webhooks**.
2. Verify the webhook URL matches the one shown in your directory settings.
3. Ensure all required events are enabled on the webhook endpoint.

### No Plans Showing Up

If plans aren't syncing:

1. Verify your products are marked as **Active** in Stripe.
2. Check that each product has at least one active price.
3. Ensure your restricted key has **Products** and **Prices** read permissions.
4. Click **Verify Credentials and Pull Plans** again to re-sync.

### Permission Errors

If you see permission errors:

1. Verify your restricted key has all required permissions listed in Step 2.
2. Create a new restricted key if needed and update your settings.

## Conclusion

Your directory is now integrated with Stripe using a streamlined setup process! With just a restricted key, you can:

* ✅ Automatically sync products and prices
* ✅ Auto-configure webhooks
* ✅ Accept subscriptions and one-time payments
* ✅ Securely process payments

If you experience any issues, check the Stripe dashboard for logs and debugging information, or refer to the troubleshooting section above.

<Frame>
  <iframe width="100%" height="400" src="https://www.youtube.com/embed/8d5u-kgkixo?si=Pas6q-Q2JBsK6Jxa" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen />
</Frame>

***

<CardGroup cols={2}>
  <Card title="Lemon Squeezy" icon="lemon" href="/paid-submissions/lemonsqueezy">
    Global tax-compliant payments with automatic VAT handling
  </Card>

  <Card title="Custom Payment Provider" icon="credit-card" href="/paid-submissions/custom-payment">
    Integrate PayPal, RazorPay, or any payment solution
  </Card>
</CardGroup>
