Test your integration
Before you accept live payments, test the full payment flow in the ePay test environment.
Testing should confirm more than whether the payment window opens. It should confirm that your system creates the payment correctly, handles the payment result, updates the order status and behaves safely if something fails or is retried.
What you will test
By the end of this guide, you should have tested:
- A successful payment
- A failed payment
- A cancelled or abandoned payment
- Redirects back to your website
- Server-side payment result handling
- Duplicate notifications or retries
- The difference between test and live values
Before you start
You need:
- An ePay account
- Access to the test environment
- An API key
- A Point of Sale ID
- A test payment flow
- A notification URL or webhook, if your integration updates orders automatically
If you use a plugin, you also need access to your webshop administration panel.
If you build a custom integration, you need access to your backend logs.
Minimum test checklist
Before going live, test that:
- You can create a payment in the test environment
- The customer can complete a successful payment
- The customer can fail or cancel a payment without the order being marked as paid
- Your success URL works
- Your failure URL works
- Your notification URL or webhook receives the payment result
- Your backend updates the correct order
- Duplicate notifications do not create duplicate order updates
- Your API key is never exposed in frontend code
- Your live setup uses live values instead of test values
Test a successful payment
Start with the happy path.
Create an order in your system
Create a payment with ePay
Complete the payment with a test card
Return to your website
Confirm that your backend receives the payment result
Confirm that the order is marked as paid
Expected result:
- The customer sees a success page
- ePay sends the payment result to your backend
- Your backend verifies the result
- The order is marked as paid
- The payment is visible in ePay Backoffice
Test a failed payment
A failed payment should not mark the order as paid.
Create a new test payment
Use a test scenario that declines or fails the payment
Return to your website
Check the order status in your system
Expected result:
- The customer sees a useful error or failure message
- The order is not marked as paid
- Your system allows the customer to try again, if relevant
- The failed payment attempt is visible in your logs or order history, if needed
Test an abandoned payment
A customer may close the browser before completing the payment.
Your integration should handle this safely.
Create a payment
Open the payment window
Close the browser or tab before completing the payment
Check the order status
Expected result:
- The order remains pending
- The order is not marked as paid
- Your system can expire, retry or clean up the pending order later
Test redirects
Redirects are part of the customer experience, but they should not be your only source of truth.
Test both success and failure redirects.
Check that:
- The success URL loads correctly
- The failure URL loads correctly
- The customer sees a clear message
- The page works on desktop and mobile
- The page does not mark an order as paid without server-side confirmation
Test payment result handling
Your backend should update the order from a server-side payment result.
This can be a notification URL, webhook or another server-side confirmation flow.
Check that:
- Your endpoint is publicly available
- Your endpoint accepts requests from ePay
- Your endpoint returns a successful response when processed
- Your endpoint logs incoming payment results during testing
- Your system can match the payment to the correct order
- Your system updates the order status correctly
Test duplicate notifications
Payment result notifications may be retried.
Your system should be safe to run the same update more than once.
For example, if the same accepted payment result is received twice, your system should not:
- Mark the order as paid twice
- Send duplicate confirmation emails
- Create duplicate invoices
- Capture or fulfill the order twice
Recommended approach:
Store the ePay payment ID or transaction ID
Check whether the payment has already been processed
Ignore or safely acknowledge duplicate events
Return a successful response
Test environment values
Make sure your integration uses test values while testing.
| Value | Test environment |
|---|---|
| API key | Test API key |
| Point of Sale ID | Test Point of Sale ID |
| Payments | Simulated payments |
| Money movement | No real money is moved |
Do not switch to live values until your account is ready for live payments.
Test plugin integrations
If you use a webshop plugin, test that:
- The payment method appears in checkout
- A successful payment updates the order status
- A failed payment does not mark the order as paid
- The customer can return to the webshop after payment
- The plugin is using test credentials
- Refunds work, if the plugin supports refunds
- The order history shows useful payment information
Test Checkout integrations
If you use Checkout, test that:
- Your backend creates the payment session
- The customer is redirected to the payment window
- The customer can complete the payment
- The customer returns to the correct URL
- Your backend receives the payment result
- Your order is updated server-side
Test Blocks integrations
If you use Blocks, test that:
- ePay.js loads correctly
- Payment fields are mounted correctly
- Validation errors are shown clearly
- The payment can be submitted
- Frontend callbacks work as expected
- Your backend still uses the server-side result as the source of truth
Common problems
The payment works, but the order is not updated
Check that:
- Your notification URL or webhook is configured
- The endpoint is publicly available
- The endpoint returns a successful response
- Your backend logs the incoming payment result
- Your system matches the payment to the correct order
The customer reaches the success page, but the payment is not confirmed
Do not use the success page alone to mark the order as paid.
Use a server-side payment result from ePay before updating the order.
The payment method does not appear
Check that:
- The payment method is enabled
- The payment method is available in the test environment
- The Point of Sale is configured correctly
- Your plugin or integration uses the correct environment
What you tested
You have now tested the most important parts of your ePay integration:
- Payment creation
- Successful payments
- Failed payments
- Abandoned payments
- Redirects
- Payment result handling
- Duplicate event safety