Staging testing
Complete all development and integration testing on staging before production credentials are issued. Staging behaves like production but uses sandboxed payment and voucher providers, so no real money or float is used.
Staging details
Item | Value |
Base URL |
|
Credentials | Staging API key and secret issued by Spendstream |
Card payments | Payment provider test site. The payment URL contains a |
Voucher issuance | Supplier sandbox. Voucher links point at a |
💡 Tip: Before you enter any card details, check that the payment URL contains test_. That is the most reliable confirmation that you are in the sandbox.
Sandbox confirmation
Both halves of a staging gift card purchase are sandboxed. No real charge is made, and no real float is drawn down. Sandbox vouchers are simulated and cannot be redeemed, so you can test as often as you need.
⚠️ Warning: This applies to staging only. In production, the payment and the voucher are real, and the voucher cost is deducted from your float balance.
Before you start
- Obtain a token with
getTokenand cache it. Tokens last 10 hours, andgetTokenis limited to 5 requests per minute. - Set an explicit
User-Agentheader on every request. Some default client agents are blocked with403and the messageerror code: 1010. - Check the
responsefield in the body of every reply. Most endpoints return HTTP200even when the operation failed. - Register a staging webhook URL by giving it to Spendstream.
Test cards, amounts and full payment walkthrough
Test cards, the amounts that force declines and errors, and a complete verified test run are documented once, in Testing payments on staging: full walkthrough. This page does not repeat them.
Key points:
Item | Value |
Successful Visa |
|
Successful Mastercard |
|
Expiry and CVV | Any future expiry, CVV |
Amount | Always declined by the test bank |
Amount | Bank system error |
American Express | Not supported |
Test plan by product
- Gift card testing
- Affiliate testing
- Webhook testing
Checklist
- [ ] I can obtain a token and I cache it.
- [ ] I set an explicit
User-Agentheader. - [ ] I check the
responsefield in every body. - [ ] I created test users and handle duplicate
UIDreplies. - [ ] I confirmed the
test_site reference before entering card details. - [ ] Gift card, affiliate and webhook tests are complete.
When these are complete, continue to Production readiness.
On this page
- Staging testing