Add giving to a Flutter app
Thethefaithapp_giving package renders general and campaign giving inside
your Flutter app. It uses the member session from thefaithapp_auth, presents
the church’s active payment provider, and waits for TheFaithApp to confirm the
payment.
The package includes:
- general giving with funds, currency, frequency, memo, and fee coverage
- campaign giving with configured donor form fields
- Stripe PaymentSheet
- hosted PayPal and Flutterwave checkout
- checkout cancellation and expiry handling
- an extension point for future payment providers
TheFaithApp creates and verifies each checkout and processes provider webhooks.
Do not add payment-provider secret keys or webhook secrets to your mobile app.
Before you begin
You need:- a Flutter app targeting Android or iOS
thefaithapp_authconfigured with a client API key- a signed-in TheFaithApp member
- an active payment provider configured for the church
1
Add the packages
Add the auth and giving packages to Install them:The giving package includes
pubspec.yaml:flutter_stripe and webview_flutter. Stop
and rebuild the app after adding it so Flutter can register their native
platform code.2
Check the native project
Keep the platform requirements from the auth SDK:
- Android
minSdk24 or newer - iOS 13.0 or newer
- Keychain Sharing enabled for the iOS Runner target
flutter_stripe for the platforms and wallet features your app enables.
PayPal and Flutterwave use an in-app WebView and do not require provider
credentials in the application.3
Create the authenticated giving client
Reuse the same auth instance that signs the member in:Before showing protected giving:The giving client does not accept a member ID or church/client ID. The
authenticated session supplies that identity on every request.
4
Render general giving
Add the built-in general giving view to a page:The view loads the church’s giving settings and funds. It shows only the
currencies, recurrence options, memo, and fee coverage allowed by that
configuration.
5
Render campaign giving
Your app chooses the campaign, then passes its numeric ID to the view:If the campaign has donor fields, the package renders and validates its
text, multiline text, number, email, telephone, select, radio, checkbox,
and date fields.Campaign discovery and selection belong to your app. The package begins
with the campaign ID you provide.
Payment-provider behavior
The package uses the church’s active/default provider. An app does not choose between Stripe, PayPal, and Flutterwave for an individual gift.
The result from a native sheet or WebView is not treated as proof of payment.
The SDK checks TheFaithApp’s webhook-backed status before reporting the final
state. A
pending result means the provider or webhook is still processing.
Campaign fields
The built-in campaign view loads the campaign definition and submits its form responses with the authenticated checkout. Required fields are validated before the payment experience opens. If you build a headless campaign form, send the same values withCampaignGivingRequest.formFields. Do not collect or send fields that are not
part of the campaign definition.
Recurring gifts
When recurring giving is enabled for the church and supported by its active provider, the general and campaign views can create a recurring gift. You can load and cancel the signed-in member’s subscriptions:Add another payment provider
Register aGivingPaymentHandler whose provider matches the value configured
on TheFaithApp:
GivingCheckoutSession provider data. A custom handler
must return the same donation ID and provider it received.