Use these scenarios to validate that your integration works reliably across success, failure, and edge conditions. They’re grouped by integration type so you can focus on what’s relevant.
ℹ️This section highlights core categories to test — for the full list of test cases to complete before go-live, please contact us at [email protected].
| Scenario | How to test | Expected result |
|---|
| Calculate carbon impact | Send a valid POST /impact_calculator request | Response includes footprint, equivalents and compensationValue |
| Handle missing data | Omit a required field (e.g. amount) | 400 Bad Request error returned |
| Invalid API key | Call with a wrong or missing X-Api-Key | 401 Unauthorised error returned |
| Funds allocation | Send valid POST /projects/funds request | Contribution succeeds, referenceId returned |
| Reversal | Reverse a previous contribution with POST /reversal | Contribution is reversed, linked to the original referenceId |
| Scenario | How to test | Expected result |
|---|
| Session created | Call POST /impactpay/sessions with valid details | Response includes impactPaySessionId + clientSecret |
| Invalid session | Use missing or bad params | Error response returned |
| Page takeover | Click on CTA in takeover component | Redirects to redirectUrl with success |
| Embedded flow | Render embedded component in confirmation page | SDK loads with correct impact data |
| Scenario | How to test | Expected result |
|---|
| Calculate carbon impact | Send a valid POST /impact_calculator request | Response includes footprint, equivalents and compensationValue |
| Valid URL | Open ImpactPay URL with valid footprintId | Page loads with correct impact data |
| Invalid reference | Open URL with invalid footprintId | Error page shown |
| Contribution flow | Complete hosted contribution | Confirmation screen, webhook fires |
| Scenario | How to test | Expected result |
|---|
| Valid event | Send test webhook with correct signature | Event accepted |
| Invalid signature | Send webhook with wrong signature | Event rejected |
| Endpoint unavailable | Temporarily block your endpoint | Event retried with exponential backoff |
| Event types | Make contribution via ImpactPay | IMPACT_PAYMENT received |
| Scenario | How to test | Expected result |
|---|
| Session created | Call POST /checkout/sessions with valid details | Response includes checkoutSessionId + clientSecret and footprintId |
| Invalid session | Use invalid product/merchant data | Error response returned |
| Toggle behaviour | Toggle compensation/round-up in checkout | Events emitted, basket total updates accordingly |
| Error handling | Break SDK load or trigger invalid state | Checkout continues, ekko:error event logged |
Depending on the payment processor for your integration of ImpactPay, you can use the following test cards for an end-to-end flow through ImpactPay on sandbox (https://impactpay-sandbox.ekko.earth/....)
- Always run tests for both happy paths and error conditions
- Include edge values (very small, very large amounts, different currencies)
- Log identifiers (
reference, footprintId, impactPaySessionId, checkoutSessionId) to simplify debugging