Test and go live
In TEST mode the SDK sends every request to the Buckaroo test environment. No real money is moved, and you can simulate each outcome a payment method supports.
Use test mode
const buckaroo = Buckaroo.InitializeClient(credentials, { mode: 'TEST', currency: 'EUR' });See Configuration for the other options.
Test data
Test card numbers, test accounts and the way to trigger a specific outcome are listed per payment method on the Test transactions page. Testing explains how the test environment works.
What to test
The successful payment proves the least. These scenarios find the bugs:
| Scenario | What it proves |
|---|---|
| A failed payment | The order is not marked as paid, and the customer sees a usable page |
| The customer cancels | The order is released and the customer can choose another method |
| The customer closes the browser before returning | Your push handler works without the return page |
| The same push message twice | Your handler is idempotent and does not process the order twice |
| A push message with a changed body | Signature validation rejects it |
| A full and a partial refund | The refund reaches Buckaroo and its own push message is handled |
| A reused invoice number | Your error handling shows the reason |
The closed browser test is the important one. It is the only test that proves your integration does not depend on the customer coming back.
Examples
The example folder in the repository has an example for each payment method, for push validation and for error handling, in JavaScript and TypeScript.
Go live
Before you switch to production:
- The full flow works in test mode, including the return page, the push handler and refunds
- Your push URL is the production URL, is reachable from the internet over HTTPS and returns HTTP
200 - Buckaroo's push IP addresses and ports are on your allow list. See Push messages
- The payment methods you need are active for your store in Plaza
- The keys are loaded from the environment, not from your code
- The SDK only runs on your server and is not part of a browser bundle
Then switch the mode to LIVE:
const buckaroo = Buckaroo.InitializeClient(credentials, { mode: 'LIVE', currency: 'EUR' });Place one real payment for a small amount, check that it appears in Plaza and that your order is updated, then refund it.
Updated about 2 hours ago