Welcome to our new docs! Please keep in mind we are still working on making everything is as accurate as possible. Join us on discord and ask us questions if you are unsure.
DezerX Spartan Logo
Modules/Gateways

Stripe

Complete step-by-step guide to set up Stripe payments.

Stripe Gateway Setup - Complete Guide

This comprehensive guide will walk you through setting up Stripe payments for your application, including obtaining API keys and configuring webhooks.

Prerequisites

  • Stripe Account
  • Access to Stripe Dashboard
  • Your application ready for integration

Step 1: Get API Keys

  1. Navigate to Stripe Dashboard

  2. Access API Keys

    • In the left sidebar, click on "Developers"
    • Click on "API keys" to view your keys
    • Copy both your Publishable key and Secret key

Stripe API Keys

Step 2: Access Webhook Workbench

  1. Navigate to Webhooks

    • In the left sidebar, click on "Developers"
    • Click on "Webhooks" to access the webhook configuration
  2. Add Webhook Endpoint

    • Click "Add destination" to create a new webhook
    • This will open the webhook workbench

Stripe Webhook Workbench

Step 3: Select Events

  1. Choose Events to Listen For
    • Select "All events" to monitor all Stripe events
    • This ensures comprehensive payment monitoring
    • Click "Continue" to proceed

Select Events

Step 4: Configure Webhook Endpoint

  1. Set Up Endpoint URL
    • Click on "Webhook endpoint" section
    • This is where you'll configure where to send events
    • Click "Continue" to proceed to the next step

Webhook Endpoint Configuration

Step 5: Configure Destination

  1. Set Destination Name

    • Enter a descriptive name for your webhook (e.g., "My Store Webhook")
  2. Set Endpoint URL

    • Important: The endpoint URL must end with /api/stripe/webhook/callback
    • Example: https://yourdomain.com/api/stripe/webhook/callback
    • This exact path is required for proper webhook handling
  3. Complete Setup

    • Review your configuration
    • Click "Continue" to create the webhook

Destination Configuration

Step 6: Webhook Created Successfully

  1. Webhook Details
    • After creating the webhook, you'll see the webhook details
    • Copy the webhook endpoint URL for your application

Step 7: Adding it to Spartan

  1. Now to enable Stripe in Spartan
    • Login and head over to admin overview
    • Click on Modules inside the sidebar, and head over to gateway tab. and find Stripe module.
    • Over here, do as the image say then press Save Settings.

Spartan

Troubleshooting

Common Issues

  1. Invalid Credentials

    • Verify Publishable Key and Secret Key are correct
    • Ensure you're using the right environment (test/live)
  2. Webhook Not Receiving Events

    • Check webhook URL is accessible
    • Verify webhook endpoint URL ends with /api/stripe/webhook/callback
    • Verify webhook is enabled and configured correctly
    • Check your server logs for errors
  3. Payment Failures

    • Verify your Stripe account is in good standing
    • Check if the payment amount is within limits
    • Ensure all required fields are provided

Support Resources

Your Stripe gateway is now configured and ready for payment processing!