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
-
Navigate to PayPal Developer Portal
- Go to https://developer.paypal.com
- Click "Log In" and sign in with your PayPal Business account credentials
-
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
-
Navigate to Applications
- In the left sidebar, click on "My Apps & Credentials"
- Click "Create App" button
-
App Configuration
- App Name: Enter a descriptive name for your application (e.g., "My Store Payment Gateway")
- Type: Select Merchant ( default )

Step 3: Creating Webhook
- Webhook Addition
- Scroll down at the end and click on Add Webhook button

Step 4: Webhook events
- Access Credentials
- Select All events
- scroll down and press create.

Step 5: Get Webhook ID
-
Webhook Created Successfully
- After creating the webhook, you'll see a success message
- The webhook will appear in the webhooks list
-
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

Step 6: Get Client Credentials
-
Navigate to App Credentials
- Go back to your app dashboard
- Click on the "Credentials" tab
-
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

Step 7: Adding it to Spartan
- 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.

Troubleshooting
Common Issues
-
Invalid Credentials
- Verify Client ID and Client Secret are correct
- Ensure you're using the right environment (sandbox/live)
-
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!
