Payment Gateways (Stripe & PayPal)
FeedbackPulse SaaS supports Stripe and PayPal for subscription billing. You can enable one or both.
💰 How 請求 Works
- You create サブスクリプションプラン 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
- サインアップ at stripe.com
- Complete identity verification
- Get your APIキー from Developers → API Keys
Step 2: Get Your API Keys
| Key | Where to Find | .env Variable |
|---|---|---|
| Publishable Key | ダッシュボード → Developers → API Keys | STRIPE_PUBLISHABLE_KEY |
| Secret Key | ダッシュボード → 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 製品 & Prices in Stripe
For each subscription plan, create a recurring price in Stripe:
- へ移動 製品 → 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.
- へ移動 Stripe ダッシュボード → 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
へ移動 Admin → 設定 → Payments:
- Toggle Stripe to enabled
- Paste your publishable and secret keys
- Save
💰 PayPal Setup
Step 1: Create a PayPal Business Account
- サインアップ at paypal.com/business
- へ移動 developer.paypal.com
Step 2: Create a REST API App
- へ移動 ダッシュボード → 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
- へ移動 PayPal Developer ダッシュボード → 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 ダッシュボード → 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
へ移動 Admin → 設定 → 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
- へ移動 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 > 設定 > 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 設定.
🔒 セキュリティ Notes
- APIキー 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