Skip to content

Payment Gateways Settings

The Payment Gateways Settings allow you to configure and manage payment processing methods for your e-commerce transactions, subscriptions, and other paid features.


Table of Contents

  1. Overview
  2. Accessing Payment Settings
  3. Supported Payment Gateways
  4. Configuring Payment Gateways
  5. Payment Gateway Settings
  6. Testing Payment Gateways
  7. Webhook Configuration
  8. Best Practices

Overview

Features

  • ✅ Multiple payment gateway support
  • ✅ Sandbox/Test mode
  • ✅ Live/Production mode
  • ✅ Gateway activation/deactivation
  • ✅ Processing fees configuration
  • ✅ Supported currencies
  • ✅ Webhook management
  • ✅ Payment method ordering
  • ✅ Custom payment instructions

Admin Routes

  • Payment Methods: /admin/settings/payments
  • Payment Method Create: /admin/settings/payments/create
  • Payment Method Edit: /admin/settings/payments/{id}/edit

Accessing Payment Settings

From Admin Panel

  1. Log in to admin panel
  2. Navigate to SettingsPayment Gateways
  3. Or go directly to: /admin/settings/payments

Permissions Required

  • Manage Payment Methods: manage-payment-methods permission

Supported Payment Gateways

Credit Card Processors

Stripe

  • Description: Popular payment processor
  • Supports: Credit cards, debit cards, digital wallets
  • Regions: Worldwide
  • Fees: 2.9% + $0.30 per transaction

Authorize.Net

  • Description: Payment gateway service
  • Supports: Credit cards, debit cards
  • Regions: US, Canada, UK, Australia
  • Fees: Varies by plan

Square

  • Description: Payment processing platform
  • Supports: Credit cards, digital wallets
  • Regions: US, Canada, UK, Australia, Japan
  • Fees: 2.6% + $0.10 per transaction

Digital Wallets

PayPal

  • Description: Digital wallet and payment processor
  • Supports: PayPal accounts, credit cards
  • Regions: Worldwide
  • Fees: 2.9% + fixed fee per transaction

Regional Gateways

Razorpay

  • Description: Payment gateway for India
  • Supports: Credit cards, UPI, net banking
  • Regions: India
  • Fees: 2% per transaction

Mollie

  • Description: European payment service
  • Supports: Credit cards, iDEAL, SEPA
  • Regions: Europe
  • Fees: Varies by payment method

Klarna

  • Description: Buy now, pay later service
  • Supports: Installment payments
  • Regions: Europe, US, Australia
  • Fees: Varies

Adyen

  • Description: Global payment platform
  • Supports: Credit cards, digital wallets, local methods
  • Regions: Worldwide
  • Fees: Varies

Alternative Methods

Cash on Delivery (COD)

  • Description: Payment upon delivery
  • Supports: Physical products only
  • Regions: Depends on shipping
  • Fees: None (may charge handling fee)

Free Products

  • Description: For free products/services
  • Supports: $0 transactions
  • Regions: All
  • Fees: None

Configuring Payment Gateways

Creating Payment Method

  1. Go to Payment GatewaysCreate New
  2. Or navigate to: /admin/settings/payments/create

Basic Information

Payment Method Name

  • Display name for customers
  • Example: Credit Card (Stripe)
  • Shown in checkout

Description

  • Brief description
  • Shown to customers
  • Example: Pay securely with your credit or debit card

Slug

  • Auto-generated from name
  • Used internally
  • Must be unique

Gateway Configuration

Select Gateway Type

Options:

  • Stripe
  • PayPal
  • Authorize.Net
  • Razorpay
  • Mollie
  • Square
  • Klarna
  • Adyen
  • Cash on Delivery
  • Free Products

Gateway-Specific Settings

Stripe Configuration:

  • Publishable Key: Public API key
  • Secret Key: Private API key
  • Webhook Secret: Webhook signing secret
  • Mode: Sandbox or Live

PayPal Configuration:

  • Client ID: PayPal app client ID
  • Client Secret: PayPal app secret
  • Mode: Sandbox or Live
  • Webhook URL: PayPal webhook endpoint

Authorize.Net Configuration:

  • API Login ID: Merchant API login
  • Transaction Key: Transaction key
  • Mode: Sandbox or Live

Razorpay Configuration:

  • Key ID: Razorpay key ID
  • Key Secret: Razorpay secret
  • Mode: Test or Live

Mollie Configuration:

  • API Key: Mollie API key
  • Mode: Test or Live

Square Configuration:

  • Application ID: Square app ID
  • Access Token: Square access token
  • Location ID: Square location ID
  • Mode: Sandbox or Production

Klarna Configuration:

  • Username: Klarna API username
  • Password: Klarna API password
  • Mode: Test or Live

Adyen Configuration:

  • Merchant Account: Adyen merchant account
  • API Key: Adyen API key
  • Mode: Test or Live

Cash on Delivery:

  • No API keys required
  • Configure instructions only

Free Products:

  • No configuration needed
  • Automatically available

General Settings

Status

  • Active: Enable payment method
  • Inactive: Disable payment method
  • Only active methods shown in checkout

Sandbox Mode

  • Enable: Use test mode
  • Disable: Use live/production mode
  • Important: Always test in sandbox first

Supported Currencies

Add Currencies:

  1. Click Add Currency
  2. Select currency code:
    • USD (US Dollar)
    • EUR (Euro)
    • GBP (British Pound)
    • INR (Indian Rupee)
    • And more...
  3. Click Add

Currency Support:

  • Some gateways support multiple currencies
  • Others are region-specific
  • Check gateway documentation

Processing Fees

Fee Type:

  • Percentage: Percentage of transaction
  • Fixed: Fixed amount per transaction
  • Both: Percentage + fixed amount

Fee Configuration:

  • Percentage Fee: Example: 2.9%
  • Fixed Fee: Example: $0.30
  • Fees added to order total
  • Shown to customers

Payment Instructions

Custom Instructions:

  • Additional information for customers
  • Shown during checkout
  • Example: Please have your order number ready

For Cash on Delivery:

  • Delivery instructions
  • Payment collection details
  • Contact information

Display Settings

Icon

  • Upload payment method icon
  • Recommended size: 64x64px
  • Format: PNG with transparency
  • Shown in checkout

Color

  • Payment method color
  • Hex color code
  • Example: #635BFF
  • Used for branding

Display Order

  • Order in checkout
  • Lower numbers appear first
  • Example: 1 = first, 2 = second

Payment Gateway Settings

Editing Payment Method

  1. Click Edit on payment method
  2. Modify settings
  3. Click Update
  4. Changes saved

Toggling Status

Route: /admin/settings/payments/{id}/toggle-status

  1. Click Toggle Status button
  2. Status changes immediately
  3. Active ↔ Inactive

Setting Default

Route: /admin/settings/payments/{id}/set-default

  1. Click Set as Default
  2. Method becomes default
  3. Shown first in checkout

Deleting Payment Method

  1. Click Delete button
  2. Confirm deletion
  3. Warning: Cannot be undone
  4. Payment method removed

Testing Payment Gateways

Sandbox/Test Mode

Enable Test Mode

  1. Go to payment method settings
  2. Enable Sandbox Mode
  3. Enter test API keys
  4. Save settings

Test Cards

Stripe Test Cards:

  • Success: 4242 4242 4242 4242
  • Decline: 4000 0000 0000 0002
  • 3D Secure: 4000 0025 0000 3155
  • Use any future expiry date
  • Use any 3-digit CVC

PayPal Test:

  • Use PayPal sandbox accounts
  • Create test buyer/seller accounts
  • Test transactions in sandbox

Authorize.Net Test:

  • Use test mode credentials
  • Test card: 4111111111111111
  • Use any expiry date

Testing Process

  1. Enable Test Mode:

    • Set sandbox mode
    • Use test credentials
  2. Create Test Order:

    • Add product to cart
    • Proceed to checkout
    • Select test payment method
  3. Complete Test Payment:

    • Use test card details
    • Complete payment
    • Verify order created
  4. Verify Results:

    • Check order status
    • Verify payment recorded
    • Check webhook received

Going Live

Before Going Live

  1. Verify Configuration:

    • All settings correct
    • Live API keys entered
    • Webhooks configured
  2. Test Thoroughly:

    • Test all payment methods
    • Test refunds
    • Test webhooks
  3. Disable Sandbox:

    • Turn off sandbox mode
    • Switch to live mode
    • Save settings

Live Mode Checklist

  • ✅ Live API keys configured
  • ✅ Sandbox mode disabled
  • ✅ Webhooks configured
  • ✅ SSL certificate installed
  • ✅ Tested with real transactions
  • ✅ Refund process tested

Webhook Configuration

What are Webhooks?

Webhooks allow payment gateways to notify your application about payment events (success, failure, refunds, etc.).

Configuring Webhooks

Stripe Webhooks

  1. Get Webhook URL:

    • Your webhook URL: https://yourdomain.com/webhooks/stripe
  2. Configure in Stripe:

    • Go to Stripe Dashboard
    • Webhooks → Add endpoint
    • Enter webhook URL
    • Select events to listen for
  3. Get Webhook Secret:

    • Copy webhook signing secret
    • Enter in admin panel
  4. Events to Listen For:

    • payment_intent.succeeded
    • payment_intent.payment_failed
    • charge.refunded

PayPal Webhooks

  1. Get Webhook URL:

    • Your webhook URL: https://yourdomain.com/webhooks/paypal
  2. Configure in PayPal:

    • Go to PayPal Developer Dashboard
    • My Apps & Credentials
    • Webhooks → Add webhook
    • Enter webhook URL
  3. Events to Listen For:

    • PAYMENT.CAPTURE.COMPLETED
    • PAYMENT.CAPTURE.DENIED
    • PAYMENT.CAPTURE.REFUNDED

Webhook Security

Verify Webhook Signatures

  • Always verify webhook signatures
  • Prevents unauthorized requests
  • Use webhook secrets
  • Validate signatures in code

Webhook URL

Format:

https://yourdomain.com/webhooks/{gateway}

Examples:

  • Stripe: /webhooks/stripe
  • PayPal: /webhooks/paypal
  • Razorpay: /webhooks/razorpay

Best Practices

Security

  1. Protect API Keys:

    • Never share API keys
    • Use environment variables
    • Rotate keys regularly
    • Use different keys for test/live
  2. Use HTTPS:

    • Always use SSL/HTTPS
    • Required for payment processing
    • Protects customer data
  3. PCI Compliance:

    • Don't store card details
    • Use tokenization
    • Follow PCI DSS guidelines
    • Use compliant gateways

Configuration

  1. Test First:

    • Always test in sandbox
    • Verify all features work
    • Test error scenarios
    • Test refunds
  2. Monitor Transactions:

    • Check payment logs
    • Monitor failed payments
    • Review webhook logs
    • Track refunds
  3. Keep Updated:

    • Update gateway integrations
    • Stay current with API changes
    • Monitor gateway status
    • Update documentation

Troubleshooting

Payment Not Processing

Solutions:

  1. Verify API keys are correct
  2. Check sandbox/live mode
  3. Verify SSL certificate
  4. Check gateway status
  5. Review error logs

Webhooks Not Working

Solutions:

  1. Verify webhook URL is accessible
  2. Check webhook secret
  3. Verify SSL certificate
  4. Check firewall settings
  5. Review webhook logs

Refunds Not Processing

Solutions:

  1. Verify refund permissions
  2. Check transaction status
  3. Verify API credentials
  4. Check gateway limits
  5. Review refund logs


Last Updated: [Date will be updated during final review]

Released under the MIT License.