DOCS

Stripe

Stripe is a global payment processor supported by Fundations Pro. It uses Stripe Checkout, a hosted payment page managed by Stripe, to accept card payments and select European methods.

> Requires: Fundations Pro

Stripe settings screen

Why use Stripe

Stripe provides broad global card acceptance and is well-suited to international organizations. The hosted Checkout flow handles PCI compliance and authentication challenges (3D Secure / SCA) without any custom code on your site.

What it does

When a donor submits the donation form with Stripe selected:

  1. Fundations calls the Stripe Checkout Sessions API to create a hosted session.
  2. The donor is redirected to Stripe’s hosted payment page, where they enter card details.
  3. On return to your site, Fundations verifies the session status directly with Stripe. If already paid, the donation is completed immediately.
  4. Stripe also sends webhook events to POST /wp-json/get-fund/v1/stripe-webhook. The plugin processes checkout.session.completed (when payment_status is paid), checkout.session.expired, and payment_intent.payment_failed.
  5. On successful payment, the donation is marked as paid, stats are updated, and a confirmation email is sent.

Card details are entered on Stripe’s servers. They never pass through your WordPress installation.

Supported payment methods

The current implementation hard-codes the following payment method types in the Checkout Session request:

MethodNotes
CardVisa, Mastercard, Amex, and others
iDEALNetherlands
BancontactBelgium

SEPA Direct Debit, Apple Pay, Google Pay, and other methods are not included in the current hard-coded list.

How to set it up

  1. Create a Stripe account at stripe.com.
  2. In the Stripe dashboard, go to Developers, then API Keys.
  3. Copy your Publishable Key (starts with pk_) and Secret Key (starts with sk_).
  4. In WordPress, go to Fundations, then Settings, then the Stripe tab.
  5. Paste the Publishable Key and Secret Key into the corresponding fields.
  6. Set the mode to Test while verifying, then switch to Live when ready.
  7. Save the settings.
Stripe api key fields

Webhook signature verification

Stripe can sign webhook notifications so your site can verify they came from Stripe. Fundations reads a webhook secret from the database options get_fund_stripe_test_webhook_secret and get_fund_stripe_live_webhook_secret. There is currently no input field for these values in the Fundations admin settings panel.

To configure webhook verification, set these options directly using WP-CLI or a one-time snippet:

wp option update get_fund_stripe_live_webhook_secret whsec_xxxxxxxxxxxx
wp option update get_fund_stripe_test_webhook_secret whsec_xxxxxxxxxxxx

To get the signing secret:

  1. In the Stripe dashboard, go to Developers, then Webhooks.
  2. Add an endpoint pointing to https://yoursite.com/wp-json/get-fund/v1/stripe-webhook.
  3. Subscribe to: checkout.session.completed, checkout.session.expired, payment_intent.payment_failed.
  4. After saving, Stripe reveals the signing secret (starts with whsec_).

If the webhook secret option is empty, signature verification is skipped and all POST requests to the endpoint are accepted.

Test cards

Use these card numbers in test mode:

Card numberResult
4242 4242 4242 4242Successful payment
4000 0000 0000 0002Card declined
4000 0025 0000 3155Requires 3D Secure

Use any future expiry date and any 3-digit CVC.

Settings reference

SettingDescription
Test modeWhen enabled, uses test API keys
Test Publishable KeyStarts with pk_test_
Test Secret KeyStarts with sk_test_
Live Publishable KeyStarts with pk_live_
Live Secret KeyStarts with sk_live_
Enable StripeToggle to activate or deactivate Stripe as a payment option

Webhook secret keys are not exposed in the admin UI and must be set via WP-CLI or a custom snippet if needed.

What you can and cannot do

You can:

  • Accept card payments from donors globally.
  • Accept iDEAL (Netherlands) and Bancontact (Belgium) in addition to cards.
  • Use Stripe’s hosted checkout, which handles 3D Secure and SCA automatically.
  • Enable webhook signature verification by setting the secret option directly.

You cannot:

  • Embed a payment form on your own page. Donors are always redirected to Stripe’s hosted checkout.
  • Accept SEPA Direct Debit, Apple Pay, Google Pay, or other Stripe methods not listed above without code customization.
  • Process recurring donations through Stripe. Recurring is currently disabled in Fundations.
  • Configure the webhook signing secret through the admin UI; it requires direct option editing.

Troubleshooting

Donation stays pending after the donor returns

The return handler checks the Checkout Session status directly with Stripe. If the session is still pending, the donation waits for the webhook. Confirm the webhook endpoint is reachable and that the correct events are subscribed in the Stripe dashboard.

Webhook events not processed

Check that the webhook endpoint in the Stripe dashboard points to https://yoursite.com/wp-json/get-fund/v1/stripe-webhook. Confirm the subscribed events include checkout.session.completed and checkout.session.expired. The event payment_intent.succeeded is not handled by Fundations; use checkout.session.completed instead.

Signature verification failing

If you have set a webhook secret and verification is failing, confirm the secret matches the one shown in the Stripe dashboard for this specific endpoint. Test and live endpoints have different secrets. Check that your server clock is accurate; verification uses a 5-minute timestamp tolerance.

iDEAL or Bancontact not appearing for donors

These methods only display when the Stripe account supports them and the payment currency matches. Confirm the Fundations currency setting is compatible with these methods (EUR for iDEAL, EUR for Bancontact).

Developer reference

Hooks

HookTypeWhen firedParameters
get_fund_donation_paidActionAfter payment marked paid (webhook or return)$donation_id (int)
get_fund_donation_completedActionAfter get_fund_donation_paid$donation_id (int), $data (array)

The $data array in get_fund_donation_completed contains: amount, action_id, donor_name, donor_email.

The Stripe webhook handler updates donation postmeta directly without firing get_fund_donation_status_transition. To react to Stripe-specific status transitions, use get_fund_donation_paid or get_fund_donation_completed.

REST endpoint

POST /wp-json/get-fund/v1/stripe-webhook

No authentication header required. HMAC-SHA256 signature verification is applied if the webhook secret option is set. Tolerance: 5 minutes. Handled events: checkout.session.completed (when payment_status === 'paid'), checkout.session.expired (sets status to cancelled), payment_intent.payment_failed.

Relevant options

Option keyTypeNotes
get_fund_stripe_test_modeboolDefaults to true
get_fund_stripe_enabledboolMaster enable/disable for Stripe
get_fund_stripe_test_publishable_keystring
get_fund_stripe_test_secret_keystring
get_fund_stripe_live_publishable_keystring
get_fund_stripe_live_secret_keystring
get_fund_stripe_test_webhook_secretstringNo admin UI field; set via WP-CLI
get_fund_stripe_live_webhook_secretstringNo admin UI field; set via WP-CLI
get_fund_stripe_methodsarrayUI-configurable method display list
get_fund_stripe_methods_orderarrayDisplay order for Stripe methods
get_fund_wizard_currencystringUsed as Stripe currency (lowercased, converted to cents)
get_fund_donation_thank_you_pageintWP page ID used as the success return URL base