Integrations
Stripe Connect
Accept payments from form respondents via Stripe Connect.
FilaForms uses Stripe Connect to enable platform payments. Form owners connect their own Stripe accounts and receive payments directly from form respondents. The platform collects a configurable application fee on each transaction.
How It Works
- Form owner connects their Stripe account on the Integrations page
- Form respondent submits a form that requires payment
- FilaForms creates a Stripe Checkout session on the connected account
- Respondent completes payment on Stripe's hosted checkout page
- Stripe sends a webhook to confirm payment status
- Platform collects an application fee automatically
Setup
Create a Stripe Platform Account
- Sign up at stripe.com if you don't have an account
- Go to Settings > Connect in your Stripe Dashboard
- Configure your onboarding settings for Standard accounts
Add Environment Variables
.env
FILAFORMS_STRIPE_SECRET_KEY=sk_test_...
FILAFORMS_STRIPE_PUBLISHABLE_KEY=pk_test_...
FILAFORMS_STRIPE_WEBHOOK_SECRET=whsec_...
FILAFORMS_STRIPE_FEE_PERCENT=2
FILAFORMS_STRIPE_CURRENCY=USD
Use
sk_test_ and pk_test_ keys during development. Switch to sk_live_ and pk_live_ in production.Register the Webhook Endpoint
In your Stripe Dashboard under Developers > Webhooks, add:
https://your-domain.com/filaforms/webhooks/stripe
Select these events:
checkout.session.completedcheckout.session.expiredpayment_intent.succeededpayment_intent.payment_failed
Copy the Signing secret (whsec_...) to your .env as FILAFORMS_STRIPE_WEBHOOK_SECRET.
User Flow
Connecting a Stripe Account
- Admin navigates to the Integrations page
- Creates a Stripe connection
- Clicks Connect with Stripe to start onboarding
- Redirected to Stripe to complete account onboarding
- After onboarding, redirected back with account linked
- Connection shows the connected account email/name
Adding Stripe to a Form
- On the form's integration settings, add a Stripe integration
- Select the connected Stripe account from the dropdown
- Choose the default currency
- Enable the integration
Accepting Payments
- Form respondent submits a payment form
- Redirected to Stripe Checkout (hosted by Stripe)
- Completes payment with card, Apple Pay, Google Pay, etc.
- Stripe sends webhook confirmation
- Submission is marked as paid
Configuration Reference
| Variable | Default | Description |
|---|---|---|
FILAFORMS_STRIPE_SECRET_KEY | -- | Platform account secret key (sk_test_ or sk_live_) |
FILAFORMS_STRIPE_PUBLISHABLE_KEY | -- | Platform account publishable key (pk_test_ or pk_live_) |
FILAFORMS_STRIPE_WEBHOOK_SECRET | -- | Webhook signing secret (whsec_...) |
FILAFORMS_STRIPE_FEE_PERCENT | 2 | Platform fee percentage per transaction |
FILAFORMS_STRIPE_CURRENCY | USD | Default currency (ISO 4217) |
Supported Currencies
USD, EUR, GBP, CAD, AUD, JPY, CNY, CHF, SEK, NZD, MXN, SGD, HKD, NOK, KRW, TRY, INR, BRL, ZAR, DKK, PLN, THB, IDR, MYR
Webhook Events
| Stripe Event | FilaForms Event | Description |
|---|---|---|
checkout.session.completed | PAYMENT_SUCCEEDED | Payment completed successfully |
checkout.session.expired | PAYMENT_FAILED | Checkout session expired |
payment_intent.succeeded | PAYMENT_SUCCEEDED | Payment intent confirmed |
payment_intent.payment_failed | PAYMENT_FAILED | Payment attempt failed |
Routes
All Stripe routes are registered under the /filaforms prefix:
| Method | URI | Purpose |
|---|---|---|
POST | /filaforms/connections/stripe/connect/{connection} | Start Stripe onboarding |
GET | /filaforms/connections/stripe/callback | Onboarding return URL |
POST | /filaforms/webhooks/stripe | Receive Stripe webhooks |
Security
- Webhook signature verification -- All incoming webhooks are verified using Stripe's HMAC-SHA256 signatures
- Authorization checks -- Only the connection owner can initiate or complete Stripe onboarding
- Connected account isolation -- Payments go directly to the connected account; the platform never holds funds