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
client = BuckarooClient(store_key, secret_key, mode="test")Test mode is the default. With Buckaroo.from_env(), the mode comes from BUCKAROO_MODE. See Configuration.
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.
Run the examples
The repository has runnable example scripts. They read your credentials from environment variables:
git clone https://github.com/buckaroo-it/BuckarooSDK_Python.git
cd BuckarooSDK_Python
pip install -r requirements.txt
BUCKAROO_STORE_KEY=your_store_key BUCKAROO_SECRET_KEY=your_secret_key python examples/ideal_payment.pyGo 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 log level is not
DEBUG, and sensitive values are masked
Then switch the mode to live:
client = BuckarooClient(store_key, secret_key, mode="live")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