Add giving to a React Native app
The@thefaithapp/giving-react-native package renders general and campaign
giving inside a React Native or Expo app. It uses the member session from
@thefaithapp/auth-react-native, 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
- headless checkout and custom payment-handler support
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:- an Expo SDK 57 or compatible React Native app
@thefaithapp/auth-react-nativeconfigured with a client API key- a signed-in TheFaithApp member
- an active payment provider configured for the church
- a native development or standalone build
1
Install the packages
Install the auth and giving SDKs:Add the native payment dependencies with Expo-compatible versions:
2
Configure the native plugins
Add an application scheme, the auth plugin, and the Stripe plugin to
Rebuild the native application after changing plugins:Stripe PaymentSheet cannot run in Expo Go.
app.json:3
Create the authenticated giving client
Reuse the auth instance that signs the member in:The Stripe override adds the return URL used by redirect and 3DS flows. Its
provider ID replaces the built-in Stripe handler while PayPal and
Flutterwave continue to use their built-in handlers.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 screen: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. Both giving views accept partialstrings overrides,
contentContainerStyle, allowRecurring, and showMemo.
Headless checkout
The rendered views are optional. A custom form can create an authenticated checkout and render the shared payment host:createCampaignCheckout(campaignId, request) and include
the campaign’s configured values in request.formFields.
Keep the host mounted until the provider completes. If your custom UI
dismisses an unrendered checkout, report it:
Add another payment provider
Register a handler whoseprovider matches the value configured on
TheFaithApp: