Skip to main content

Payment Gateways (Stripe & PayPal)

FeedbackPulse SaaS supports Stripe and PayPal for subscription billing. You can enable one or both.


๐Ÿ’ฐ How Billing Worksโ€‹

  1. You create subscription plans in Admin โ†’ Plans (e.g., Starter $9.99/mo, Pro $29.99/mo)
  2. Each plan has a Stripe Price ID and/or PayPal Plan ID
  3. When a tenant subscribes, they're redirected to Stripe Checkout or PayPal
  4. After payment, FeedbackPulse activates their subscription
  5. Webhooks keep everything in sync (renewals, cancellations, failures)

๐Ÿ’ณ Stripe Setupโ€‹

Step 1: Create a Stripe Accountโ€‹

  1. Sign up at stripe.com
  2. Complete identity verification
  3. Get your API keys from Developers โ†’ API Keys

Step 2: Get Your API Keysโ€‹

KeyWhere to Find.env Variable
Publishable KeyDashboard โ†’ Developers โ†’ API KeysSTRIPE_PUBLISHABLE_KEY
Secret KeyDashboard โ†’ Developers โ†’ API KeysSTRIPE_SECRET_KEY
STRIPE_PUBLISHABLE_KEY=pk_live_xxxxxxxxxxxxxxxx
STRIPE_SECRET_KEY=sk_live_xxxxxxxxxxxxxxxx

๐Ÿงช Testing: Use pk_test_ and sk_test_ keys for sandbox mode.

Step 3: Create Products & Prices in Stripeโ€‹

For each subscription plan, create a recurring price in Stripe:

  1. Go to Products โ†’ Add Product
  2. Name: "FeedbackPulse Starter" (or your plan name)
  3. Add a recurring price: $9.99 / month
  4. Optionally add an annual price: $99.99 / year
  5. Copy the Price ID (starts with price_)

In FeedbackPulse, go to Admin โ†’ Plans โ†’ Edit:

Plan FieldStripe Value
Stripe Monthly Price IDprice_xxxxxxxxx (monthly price ID)
Stripe Annual Price IDprice_xxxxxxxxx (annual price ID)

Step 5: Set Up Stripe Webhooksโ€‹

This is critical โ€” webhooks keep subscriptions in sync.

  1. Go to Stripe Dashboard โ†’ Developers โ†’ Webhooks
  2. Click Add endpoint
  3. Endpoint URL: https://yourdomain.com/webhooks/stripe
  4. Events to listen for:
    • checkout.session.completed
    • customer.subscription.created
    • customer.subscription.updated
    • customer.subscription.deleted
    • invoice.payment_failed
  5. Copy the Signing Secret (starts with whsec_)
STRIPE_WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxx

Step 6: Enable in Admin Panelโ€‹

Go to Admin โ†’ Settings โ†’ Payments:

  • Toggle Stripe to enabled
  • Paste your publishable and secret keys
  • Save

๐Ÿ’ฐ PayPal Setupโ€‹

Step 1: Create a PayPal Business Accountโ€‹

  1. Sign up at paypal.com/business
  2. Go to developer.paypal.com

Step 2: Create a REST API Appโ€‹

  1. Go to Dashboard โ†’ Apps & Credentials
  2. Click Create App
  3. Name: "FeedbackPulse"
  4. Copy the Client ID and Secret
PAYPAL_CLIENT_ID=your_client_id
PAYPAL_CLIENT_SECRET=your_client_secret
PAYPAL_MODE=live

๐Ÿงช Testing: Use PAYPAL_MODE=sandbox and sandbox credentials.

Step 3: Create Subscription Plans in PayPalโ€‹

  1. Go to PayPal Developer Dashboard โ†’ Subscriptions โ†’ Plans
  2. Create a product first, then create plans for it
  3. Copy each Plan ID (starts with P-)

In Admin โ†’ Plans โ†’ Edit:

Plan FieldPayPal Value
PayPal Monthly Plan IDP-xxxxxxxxx (monthly plan)
PayPal Annual Plan IDP-xxxxxxxxx (annual plan)

Step 5: Set Up PayPal Webhooksโ€‹

  1. In PayPal Developer Dashboard โ†’ Webhooks
  2. Add webhook URL: https://yourdomain.com/webhooks/paypal
  3. Select events:
    • BILLING.SUBSCRIPTION.CREATED
    • BILLING.SUBSCRIPTION.ACTIVATED
    • BILLING.SUBSCRIPTION.UPDATED
    • BILLING.SUBSCRIPTION.CANCELLED
    • BILLING.SUBSCRIPTION.SUSPENDED
    • PAYMENT.SALE.COMPLETED
  4. Copy the Webhook ID
PAYPAL_WEBHOOK_ID=your_webhook_id

Step 6: Enable in Admin Panelโ€‹

Go to Admin โ†’ Settings โ†’ Payments:

  • Toggle PayPal to enabled
  • Paste your Client ID and Secret
  • Save

๐Ÿงช Testing Paymentsโ€‹

Stripe Test Modeโ€‹

Use test card numbers:

  • Success: 4242 4242 4242 4242
  • Decline: 4000 0000 0000 0002
  • 3D Secure: 4000 0025 0000 3155

Expiry: any future date. CVC: any 3 digits.

PayPal Sandboxโ€‹

  1. Go to developer.paypal.com โ†’ Sandbox โ†’ Accounts
  2. Use the generated sandbox buyer account to test payments

Multi-Currency Supportโ€‹

Plans can be assigned different currencies (e.g., USD, EUR, GBP). Configure the list of supported currencies in Admin > Settings > Payments under the Supported Currencies field.

  • Stripe: Checkout sessions automatically pass the plan's currency, so customers are charged in the correct currency.
  • PayPal: Subscription requests include currency metadata matching the plan's configured currency.
  • Currency is stored on each invoice for accurate record-keeping.

For details on configuring supported currencies, see Platform Settings.


๐Ÿ”’ Security Notesโ€‹

  • API keys are stored encrypted in the platform_settings table
  • Webhook signatures are verified (Stripe HMAC, PayPal signature validation)
  • Payment events are logged in the payment_events table (Admin โ†’ Payments)
  • Event deduplication prevents double-processing of webhooks

โญ๏ธ Next Stepsโ€‹