Sandbox and testing
The sandbox is a separate deployment of Spleetz for testing. It runs the same code as live, but it has its own database and its own payment provider accounts, in their test modes, and it moves test money only. Nothing you do there touches live payments.
| Live | Sandbox | |
|---|---|---|
| API | https://api.spleetz.com |
https://api-sandbox.spleetz.com |
| Pay page | pay.spleetz.com |
pay-sandbox.spleetz.com |
| Secret keys | sk_live_... |
sk_test_... |
| Connected apps | Live connections | Test connections ("livemode": false) |
| Webhook endpoints | https only |
https or http |
Getting in
Section titled “Getting in”Use the same Spleetz sign-in as live. In the dashboard, switch on Test mode in the header. An amber “Test data” band shows while it is on, and the dashboard then works against the sandbox.
The first time you switch it on, your business’s details (name, venues, tills and team) are copied into the sandbox, so you start with the same set-up. Bank details, payouts and payments are never copied.
Set up the business’s payment account in Test mode as the dashboard asks. A payment can’t be created without one, here or live.
Keys and servers stay apart
Section titled “Keys and servers stay apart”- Make test keys in Test mode, under Settings > API keys. They start
sk_test_. - A test key works only on the sandbox, and a live key only on live. Sent to the other, a key is
refused with
403and a message saying where it belongs. - A connected app connecting through the sandbox gets a test connection, whatever
modeit asks for. The live API refusesmode=test.
Keep the base URL and the key together in your configuration, so the two can’t be mixed up:
SPLEETZ_API=https://api-sandbox.spleetz.comSPLEETZ_KEY=sk_test_...Test cards
Section titled “Test cards”Pay a sandbox payment on its payUrl with your provider’s test cards. Which provider the
business uses is shown on its payment account in the dashboard.
Stripe
Section titled “Stripe”Any future expiry date, any 3-digit CVC and any postcode.
| Card number | What happens |
|---|---|
4242 4242 4242 4242 |
Paid. |
4000 0025 0000 3155 |
Asks the payer to authenticate (3-D Secure), then is paid. |
4000 0000 0000 9995 |
Declined: insufficient funds. |
4000 0000 0000 0002 |
Declined. |
Stripe lists more in its testing guide.
Paystack
Section titled “Paystack”| Card number | CVV | Expiry | PIN | OTP |
|---|---|---|---|---|
4084 0840 8408 4081 |
408 |
Any future date | 0000 |
123456 |
The PIN and OTP are entered on Paystack’s own page, never on Spleetz’s. Paystack lists more in its test payments guide.
Testing a split bill
Section titled “Testing a split bill”Open the same payUrl in two browsers, or a browser and a private window, and split the bill
between them. Each pays a share with a test card. Watch the split.* events arrive, then the
bill’s payment.succeeded once the last share is in.
Testing webhooks
Section titled “Testing webhooks”- In Test mode, add an endpoint under Settings > Webhooks. A test endpoint may use plain
http, so a tunnel to your laptop works. - Press Send test event. Your server should get
webhook.testand verify its signature. - Create and pay a test payment, and check you get
payment.succeeded.
Test endpoints hear about test payments only, and live endpoints about live payments only.
Testing recurring bills
Section titled “Testing recurring bills”Recurring periods run on their real schedule: a monthly bill’s second period falls due a month
after the first is paid. To see each period’s events sooner, use "interval": "week" in the
sandbox.