The scenario
Customer: A mid-size nonprofit with a marketing website and a Raise account. They want a donation form on their/donate page that captures gifts directly in Raise.
Partner: A web platform or agency that hosts (or develops) the customer’s website. The customer has asked the partner to wire up the donation form, react to completed gifts, and send custom thank-you emails.
Constraints:
- The donation form itself is configured in Raise (form fields, designations, payment processor) — not via API.
- The partner needs to embed the form on the customer’s existing website without breaking the rest of the site.
- After each donation, the partner needs to send a custom-branded thank-you email and notify the customer’s team in Slack.
- The integration must work for the customer’s test donations during development and for real donations in production.
Architecture overview
Two flows:- Donation flow (left to right): donor visits the customer’s site, the embed loads from Raise, the donor completes the form, Raise processes the payment.
- Post-donation flow (right side): Raise fires a webhook to the partner, the partner triggers downstream actions.
Prerequisites
Before starting the project, confirm these are in place:
If any of these aren’t in place, address them before writing integration code.
Step 1: get the embed code from the customer
The customer’s Raise administrator opens the form in the admin UI and copies the embed code. They provide it to the partner through whatever onboarding flow the partner has built — typically a settings field in the partner’s product.JavaScript
raiseFormId may not be known yet — it will be visible in the first webhook event the partner receives. Leave it as null initially and capture it from the first delivery.
Step 2: build the donation page
The partner serves the customer’s/donate page with the embed code dropped in. A minimal Express handler:
JavaScript
donation-page.ejs
- Use raw output (
<%- %>in EJS,{{{ }}}in Handlebars, etc.). The embed code is HTML; escaping it would prevent the embed from rendering. - Serve the page over HTTPS. Raise’s embed loads resources over HTTPS; embedding on HTTP produces mixed-content warnings or blocks the form.
- Don’t wrap the embed in another iframe or apply transforms. The embed code is designed to work as Raise provides it.
Step 3: subscribe to the webhook
The partner integration needs to know when donations complete. Subscribe to gift events for this customer:JavaScript
- The
notificationUrlincludescustomerIdin the path so the receiver can identify which customer’s event is arriving. - The secret is generated fresh per customer — never reuse secrets across customers.
- Event type
10is the working-hypothesis value for “Gift Created”; confirm via discovery against the customer’s test events. See Event Types: Discovering the mapping.
webhook.id and the secret in the customer’s settings.
Step 4: build the webhook receiver
The receiver handles incoming events. Three responsibilities: verify the signature, acknowledge quickly, queue for processing.JavaScript
x-raise-signature above is a placeholder) by inspecting real deliveries.
Step 5: process events asynchronously
The worker drains the queue and runs the post-donation actions:JavaScript
- Captures the form ID on first delivery (populates the
raiseFormIdleft null in step 1). - Filters test-mode gifts in production to avoid sending test emails to real donors.
- Triggers the customer-branded thank-you email.
- Posts to the customer’s Slack channel.
- Alerts the customer’s major-donor team for large gifts.
Step 6: send the thank-you email
The thank-you email uses customer-specific templates and pulls fields from the gift record:JavaScript
- Use
gift.donor.email— the donor’s primary email captured at donation time. - Use
gift.formattedAmountfor display — it’s already in the donor’s currency with the right number of decimals. - Pass
projectandcampaignto the template so the email can mention what the gift supported.
Step 7: post to Slack
A simple notification with the gift details:JavaScript
idempotency_key field (supported by Slack and many other systems) provides an extra defense against duplicate notifications even if the dedup store check is bypassed.
Step 8: alert the major-donor team
For gifts over the customer’s configured threshold, a higher-touch alert:JavaScript
GET /api/Donor/{donorId}/gifts to fetch the donor’s recent gifts.
Step 9: validate end-to-end in test mode
Before going live, run a complete end-to-end test:1
Generate a test payment method
paymentMethodId for the next step.2
Submit a test donation through the embedded form
Open the customer’s
/donate page. Fill out the form with test details (name, email, amount). Use the test card details the customer’s gateway provides for test mode (typically 4242 4242 4242 4242 or similar; consult the gateway’s documentation).3
Confirm the event arrives
Watch your webhook receiver’s logs. Within seconds of submission, a webhook event should arrive. If it doesn’t, check
GET /api/Webhook/{id}/log/list to see whether Raise attempted delivery and what status code your receiver returned.4
Confirm signature verification passes
Check that the event made it past the signature verification gate. If not, see Signature Verification for the troubleshooting flow.
5
Confirm the thank-you email sent
Check the inbox of the email address you submitted. The thank-you email should arrive within a minute of the donation.
6
Confirm Slack notification posted
Check the customer’s Slack channel for the donation notification.
7
Confirm dedup works
Use the webhook log endpoint to trigger a redelivery (some platforms support this; if Raise doesn’t, manually replay the captured payload through your queue). Confirm the second processing produces no second email and no second Slack post.
Step 10: go live
Once test mode validates cleanly, switch to production:
The cutover is typically just a configuration change — flip the settings to production values and let real donations flow through. Monitor closely for the first few real donations to confirm the production setup works as it did in test.
Production monitoring
Long-term, keep an eye on:
Build dashboards for these and alert on anomalies. The investment pays off the first time a customer asks “did the donations from Tuesday’s appeal make it through?” and you can answer with confidence.
Variations
A few common variations on this recipe:
The core architecture (embed + webhook + queue + worker) supports many variations without significant restructuring.
Where to go next
Customize the Donation Flow
Pre-populate donor data, override defaults, and customize the donation experience.
Post-Donation Thank-You Flows
Deeper coverage of the email and notification patterns for steps 6–8.
Embed a Form (Workflow)
The general-purpose workflow that underlies this recipe.
Sync Raise Gifts to an External System
Extend this recipe to also sync gifts into the partner’s accounting, BI, or CRM system.