Post-purchase web SDKs
This page reflects the current API behaviour. Some details may change as v3 is finalised.
Offer an impact experience after payment using ekko's postāpurchase SDKs. ekko renders the components serverāside, and the SDK provides a simple way to drop them into your confirmation flow.
See our post-purchase SDKs in action at https://pwa.ekko.earth/
When to use
- You want a hosted impact experience
- You prefer ekko to process the contribution payment separately from the main payment
- You need fast time to value with low engineering effort
Options at a glance
| Option | Placement in journey | Effort | Best for |
|---|---|---|---|
| Full page takeover SDK | Between payment complete ā order confirmation | Medium | A focused, immersive impact journey |
| Embedded SDK | Inside your existing confirmation page | Medium | A nativeāfeeling module within your own layout |
How they work (shared flow)
-
Create an organisation (if needed). If your hierarchy requires child organisations, create them using
POST /v3/organisations. See Create an organisation. This step is optional if you're working with your top-level organisation only. -
Create a post-purchase session. Your backend calls
POST /v3/post-purchase/sessionswith order context and merchant details. You receive asessionIdand a short-livedclientSecretto initialise the SDK. -
Initialise the SDK on the client. Pass the
clientSecretto the SDK to authenticate the session. ekko server-side renders the component. -
Consumer reviews and contributes. Consumers see their footprint, learn more about projects, and can make a contribution using ekko's hosted payment page.
-
Set up webhooks. To keep your systems in sync, ekko provides webhook events for post-purchase payments:
IMPACT_PAYMENTā fired when a contribution payment is successfully processedIMPACT_PAYMENT_REVERSALā fired when a processed payment is refunded or voided
-
Records and reconciliation. Contributions, credits and any reversals appear in your reconciliation records.
What's shared across both SDKs
- Server-side rendered content and visuals that stay up to date as we apply new learnings and local insights - without you needing to make changes
- Shortālived
clientSecretfor secure initialisation - Resilience features so existing confirmation pages remain usable if the SDK fails to load
