✓ Free Shipping on Orders Over $50 | 30-Day Money-Back Guarantee | Fast Checkout
HN

Payment Gateway Setup

Complete guide to integrating payment processors with your store

Choose Your Payment Provider:

Stripe Payment Integration

Most popular payment processor with best-in-class features

Why Choose Stripe?

  • Lowest transaction fees (2.9% + $0.30)
  • Support for 135+ currencies
  • Advanced fraud protection
  • Excellent dashboard & analytics
  • Recurring billing & subscriptions

Setup Steps:

Step 1: Create Stripe Account

Visit stripe.com and sign up for a free account with your business email.

  • • Provide business information and banking details
  • • Verify your email address
  • • Wait for approval (usually within minutes)

Step 2: Get Your API Keys

Go to Stripe Dashboard → Developers → API Keys

  • • Copy your Publishable Key
  • • Copy your Secret Key (keep this safe!)
  • • Store both keys securely in your environment variables

Step 3: Configure Webhook

Set up webhooks to receive payment status updates

  • • Go to Developers → Webhooks → Add endpoint
  • • Endpoint URL: https://yourdomain.com/api/webhooks/stripe
  • • Select events: charge.succeeded, charge.failed

Step 4: Integrate with Checkout

Add Stripe.js to your checkout page and handle payments

<script src="https://js.stripe.com/v3/"></script> <form id="payment-form"> <div id="card-element"></div> <button type="submit">Pay Now</button> </form>

Step 5: Test Integration

Use Stripe's test card numbers to verify everything works

  • • Success: 4242 4242 4242 4242
  • • Failure: 4000 0000 0000 0002
  • • Any future expiration date and CVC works for testing

PayPal Payment Integration

Global payment solution trusted by millions

Why Choose PayPal?

  • Largest customer base globally
  • Transaction fees: 2.9% + $0.30
  • Buyer and seller protection
  • Multi-currency support
  • Subscription & recurring billing

Setup Steps:

Step 1: Create PayPal Business Account

Visit business.paypal.com and sign up with your business email.

Step 2: Access Developer Dashboard

Go to Settings → API Signature (or Certificates for alternative)

  • • Note your Merchant Account ID
  • • Get your API Signature for REST API calls

Step 3: Generate REST API Credentials

Create REST app for modern PayPal integration

  • • Go to Apps & Credentials
  • • Create new REST app
  • • Copy Client ID and Secret

Step 4: Configure IPN (Instant Payment Notification)

Set up webhooks for payment confirmations

  • • Go to Account Settings → Notifications → IPN Settings
  • • Notification URL: https://yourdomain.com/api/webhooks/paypal

Step 5: Test Payments

Use PayPal Sandbox for testing before going live

  • • Create sandbox buyer and seller accounts
  • • Test checkout flow end-to-end
  • • Verify webhooks are firing correctly

Square Payment Integration

All-in-one payment solution for modern businesses

Why Choose Square?

  • Competitive fees: 2.6% + $0.30
  • Easy integration with Web Payments SDK
  • Built-in analytics and reporting
  • Point-of-sale integration available
  • Excellent customer support

Setup Steps:

Step 1: Create Square Account

Visit squareup.com and sign up for an account.

Step 2: Get Your API Keys

Go to Developer Dashboard → Credentials

  • • Copy your Production Application ID
  • • Copy your Production Access Token
  • • Note your Location ID

Step 3: Set Up Web Payments SDK

Include Square's Web Payments SDK in your checkout

<script src="https://web.squarecdn.com/v1/square.js"></script>

Step 4: Configure Webhooks

Receive real-time payment notifications

  • • Go to Webhooks in Developer Dashboard
  • • Endpoint URL: https://yourdomain.com/api/webhooks/square

Step 5: Test with Sandbox

Test your integration before going live

  • • Use sandbox credentials for testing
  • • Switch to production after verification

Best Practices for Payment Security

Use HTTPS Only

Always use SSL/TLS encryption for all payment pages. Never transmit payment data over unencrypted connections.

Store Keys Securely

Never commit API keys to version control. Use environment variables and secure key management systems.

Validate Webhooks

Always validate webhook signatures from payment providers to prevent fraudulent notifications.

PCI Compliance

Use tokenized payments and avoid storing raw card data. Let payment providers handle PCI compliance.

Enable 3D Secure

Require 3D Secure authentication for high-risk transactions to reduce chargebacks and fraud.

Log & Monitor

Keep audit logs of all transactions and set up alerts for suspicious activity patterns.

Need Help?

Our support team is ready to help you get your payment system set up correctly.