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

PayPal

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

PayPal Gateway Setup - Complete Guide

This comprehensive guide will walk you through setting up PayPal payments for your application, including obtaining client credentials and configuring webhooks.

Prerequisites

  • PayPal Business Account
  • Access to PayPal Developer Dashboard
  • Your application ready for integration

Step 1: Access PayPal Developer Dashboard

  1. Navigate to PayPal Developer Portal

  2. Dashboard Overview

    • Once logged in, you'll see the PayPal Developer Dashboard
    • This is your central hub for managing applications and credentials

Step 2: Create a New Application

  1. Navigate to Applications

    • In the left sidebar, click on "My Apps & Credentials"
    • Click "Create App" button
  2. App Configuration

    • App Name: Enter a descriptive name for your application (e.g., "My Store Payment Gateway")
    • Type: Select Merchant ( default )

Create PayPal Application

Step 3: Creating Webhook

  1. Webhook Addition
    • Scroll down at the end and click on Add Webhook button

Creating Webhook

Step 4: Webhook events

  1. Access Credentials
    • Select All events
    • scroll down and press create.

Webhook events

Step 5: Get Webhook ID

  1. Webhook Created Successfully

    • After creating the webhook, you'll see a success message
    • The webhook will appear in the webhooks list
  2. Copy Webhook ID

    • Find your webhook in the list
    • Copy the Webhook ID (e.g., 7B89XXXXXX2Y)
    • This ID is needed for webhook verification in your application

Webhook ID

Step 6: Get Client Credentials

  1. Navigate to App Credentials

    • Go back to your app dashboard
    • Click on the "Credentials" tab
  2. Copy Client ID and Secret

    • Client ID: Copy this public identifier (safe for frontend use)
    • Client Secret: Copy this private key (keep secure, backend only)
    • These credentials are needed for PayPal API authentication

Get Client Credentials

Step 7: Adding it to Spartan

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

Spartan

Troubleshooting

Common Issues

  1. Invalid Credentials

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

    • Check webhook URL is accessible
    • Verify webhook is enabled and configured correctly
    • Check your server logs for errors
    • Make sure your domain is not flagged. ( Check PayPal for more info )

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