ImpactPay sessions
POST: /impactpay/sessions
The ImpactPay Sessions endpoint creates a post‑purchase session to power the ImpactPay SDK. Use it when you want to offer a hosted, post‑payment impact experience as a page takeover or an embedded component in your customer journey.
See the API reference for example payloads.
What it does
- Creates the
sessionIdand aclientSecretneeded to initialise the SDK - Calculates the carbon footprint and compensation amounts in the background to be used in the SDK renderer
Key fields explained
productId→ associates the session with your configured product and its projectsamount→ object withvalueandcurrencyCodeused for calculation and displayorder→ optional object for richer UX and reporting (e.g., items, shipping, taxes, orderReference)clientSecret→ short‑lived token passed to the SDK to authenticate the session
Best practices
- Pick the right display: use page takeover for a focused, branded journey or embedded for a lightweight confirmation‑page module
- Handle tokens server‑to‑client: create sessions on your backend and send only the
clientSecretto the frontend
Updated 7 months ago
