Payment Gateways (Stripe & PayPal)
FeedbackPulse SaaS supports Stripe and PayPal for subscription billing. You can enable one or both.
๐ฐ How Billing Worksโ
- You create subscription plans in
Admin โ Plans(e.g., Starter $9.99/mo, Pro $29.99/mo) - Each plan has a Stripe Price ID and/or PayPal Plan ID
- When a tenant subscribes, they're redirected to Stripe Checkout or PayPal
- After payment, FeedbackPulse activates their subscription
- Webhooks keep everything in sync (renewals, cancellations, failures)
๐ณ Stripe Setupโ
Step 1: Create a Stripe Accountโ
- Sign up at stripe.com
- Complete identity verification
- Get your API keys from Developers โ API Keys
Step 2: Get Your API Keysโ
| Key | Where to Find | .env Variable |
|---|---|---|
| Publishable Key | Dashboard โ Developers โ API Keys | STRIPE_PUBLISHABLE_KEY |
| Secret Key | Dashboard โ Developers โ API Keys | STRIPE_SECRET_KEY |
STRIPE_PUBLISHABLE_KEY=pk_live_xxxxxxxxxxxxxxxx
STRIPE_SECRET_KEY=sk_live_xxxxxxxxxxxxxxxx
๐งช Testing: Use
pk_test_andsk_test_keys for sandbox mode.
Step 3: Create Products & Prices in Stripeโ
For each subscription plan, create a recurring price in Stripe:
- Go to Products โ Add Product
- Name: "FeedbackPulse Starter" (or your plan name)
- Add a recurring price: $9.99 / month
- Optionally add an annual price: $99.99 / year
- Copy the Price ID (starts with
price_)
Step 4: Link Prices to Plansโ
In FeedbackPulse, go to Admin โ Plans โ Edit:
| Plan Field | Stripe Value |
|---|---|
| Stripe Monthly Price ID | price_xxxxxxxxx (monthly price ID) |
| Stripe Annual Price ID | price_xxxxxxxxx (annual price ID) |
Step 5: Set Up Stripe Webhooksโ
This is critical โ webhooks keep subscriptions in sync.
- Go to Stripe Dashboard โ Developers โ Webhooks
- Click Add endpoint
- Endpoint URL:
https://yourdomain.com/webhooks/stripe - Events to listen for:
checkout.session.completedcustomer.subscription.createdcustomer.subscription.updatedcustomer.subscription.deletedinvoice.payment_failed
- 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โ
- Sign up at paypal.com/business
- Go to developer.paypal.com
Step 2: Create a REST API Appโ
- Go to Dashboard โ Apps & Credentials
- Click Create App
- Name: "FeedbackPulse"
- 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=sandboxand sandbox credentials.
Step 3: Create Subscription Plans in PayPalโ
- Go to PayPal Developer Dashboard โ Subscriptions โ Plans
- Create a product first, then create plans for it
- Copy each Plan ID (starts with
P-)
Step 4: Link Plans in FeedbackPulseโ
In Admin โ Plans โ Edit:
| Plan Field | PayPal Value |
|---|---|
| PayPal Monthly Plan ID | P-xxxxxxxxx (monthly plan) |
| PayPal Annual Plan ID | P-xxxxxxxxx (annual plan) |
Step 5: Set Up PayPal Webhooksโ
- In PayPal Developer Dashboard โ Webhooks
- Add webhook URL:
https://yourdomain.com/webhooks/paypal - Select events:
BILLING.SUBSCRIPTION.CREATEDBILLING.SUBSCRIPTION.ACTIVATEDBILLING.SUBSCRIPTION.UPDATEDBILLING.SUBSCRIPTION.CANCELLEDBILLING.SUBSCRIPTION.SUSPENDEDPAYMENT.SALE.COMPLETED
- 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โ
- Go to developer.paypal.com โ Sandbox โ Accounts
- 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_settingstable - Webhook signatures are verified (Stripe HMAC, PayPal signature validation)
- Payment events are logged in the
payment_eventstable (Admin โ Payments) - Event deduplication prevents double-processing of webhooks