Embed surfaces
There are three distinct embed surfaces, and which one applies depends on what kind of integration you’re building:
This page focuses on the first two — embedding the Raise-hosted form. For the third (fully custom flow), see Process a Donation.
The exact embed mechanism (iframe, JavaScript snippet, or other) the Raise admin UI provides is an admin-UI concern, not an API concern. Walk through it with the customer’s Raise administrator when setting up the integration. The patterns on this page apply regardless of the specific embed shape, since all of them deliver HTML/JS to the donor’s browser and POST to
/api/Raise/give on submission.When to use this workflow
The four-step embed workflow
Step 1: customer obtains the embed code
The customer’s Raise administrator opens the form in the admin UI and copies the embed code provided there. This step happens outside the API — your integration doesn’t trigger it. The customer provides the embed code to your integration through whatever onboarding flow you’ve built. Typically this is a settings page in your integration’s UI where the customer pastes the code into a text field:Step 2: render the embed code on the target page
For an integration that hosts the page directly, render the embed code as HTML in the donation page’s body:HTML
- HTTPS only. The embed code typically loads resources from Raise over HTTPS; embedding it on an HTTP page will produce mixed-content warnings or block the form entirely in modern browsers. Always serve the embedding page over HTTPS.
- No Content Security Policy conflicts. If the embedding page sets a restrictive CSP, allow the Raise origin for
frame-src,script-src, andconnect-srcas appropriate for the embed mechanism. Coordinate the exact directives with the customer if needed. - Don’t wrap or interfere with the embed. The embed code is designed to work as-is. Wrapping the form in another iframe or modifying the embed’s HTML can break the donor experience.
Step 3: capture donation events server-side
When a donor completes the embedded form, the form’s submission flow callsPOST /api/Raise/give and creates the Gift in Raise. Your integration learns about the donation through the webhook subscription — not by parsing the embedded form’s UI.
JavaScript
Step 4: handle the donor’s return flow
After the form submission completes, the embedded form typically displays a thank-you screen within the embed. The donor stays on your page. Two patterns for what your integration does next:Pattern A: stay on the embedding page
The simplest pattern — let the form’s built-in thank-you display handle the user experience and let your integration’s server-side webhook handler trigger any background work (thank-you email, CRM sync, etc.). This is the right default when:- The embedding page is a standalone donation page that doesn’t need to do anything user-facing after the donation.
- The form’s thank-you display is sufficient on its own.
Pattern B: redirect or display custom content
For more involved flows — multi-step processes, custom thank-you experiences, or integration-specific follow-ups — coordinate with the form’s configuration to redirect or display custom content after submission. The mechanism for this is form-configuration-side (set in the Raise admin UI) — not via API. Coordinate with the customer’s admin team to configure the form’s success behavior. From the partner side, what your integration controls is the destination URL the form redirects to and any logic on that destination page.JavaScript
The form’s exact post-submission redirect behavior (whether a
giftId query parameter is appended, the redirect URL configuration, etc.) is set in the Raise admin UI and not documented in the API spec. Confirm against the live form configuration before relying on specific URL parameters.Multi-customer embed patterns
For partner integrations that host donation pages for multiple customers, each customer’s embed code needs to be served correctly to their respective pages.Pattern: per-customer embed code storage
Store the embed code as a per-customer setting:JavaScript
Multiple forms per customer
A single customer often has multiple forms (general giving, monthly sustainers, capital campaign, etc.). Store each form’s embed code separately and let the customer choose which form a specific page uses:JavaScript
/donate/customer_acme/general, /donate/customer_acme/monthly, etc. — clean per-form entry points without each form needing its own bespoke page.
Testing the embed locally
For development, embed the form on a local page that runs over HTTPS. Tools that help:
A typical local-dev setup:
1
Start your local server over HTTPS
Use ngrok to expose
localhost:3000 over HTTPS at a public URL.2
Configure the customer's test-mode form to allow your dev origin
If the form’s embed has origin restrictions, add your ngrok URL to the allowlist temporarily. Coordinate with the customer’s admin if needed.
3
Use the test-payment-method generator
POST /api/Raise/generate-test-payment-method produces a token usable in test mode. Use this for development submissions.4
Subscribe your dev webhook to the test-mode events
Point your webhook subscription’s
notificationUrl at your ngrok URL so events from test-mode donations reach your local development server.5
Run a test donation through the embedded form
Confirm the donation completes, the webhook arrives, and your post-donation logic fires correctly.
Common embed issues
A few issues come up frequently when embedding Raise forms. Quick references:
The webhook log endpoints (
GET /api/Webhook/{id}/log/list) are particularly useful for investigating “donation succeeded but webhook didn’t arrive” — they show whether Raise attempted delivery and how the receiver responded. See Webhooks Overview.
Where to go next
Configure a Donation Form
The complementary workflow for the partner-side wiring around any form.
Process a Donation
The
POST /api/Raise/give flow for fully-custom (non-embedded) donation experiences.Webhooks Overview
Set up the webhook subscription that delivers donation events to your integration.
Embed a Form on a Website (Recipe)
An end-to-end recipe walking through a complete embed-and-react integration.