Sandbox
The CoverPay sandbox lets you test your integration without making real charges. All cp_test_ API keys automatically use the sandbox environment.
Base URLs
| Environment | Base URL | API Key Prefix |
|---|---|---|
| Sandbox | https://sandbox.coverpayme.com/v1 | cp_test_... |
| Production | https://api.coverpayme.com/v1 | cp_live_... |
Test Credentials
Use these test values in sandbox to simulate different scenarios.
Test Users
| Scenario | |
|---|---|
user_approved@test.coverpay.com | All eligibility checks pass, all providers approve |
user_underage@test.coverpay.com | Fails age check (UNDER_18) |
user_nokyc@test.coverpay.com | Fails KYC check (KYC_NOT_STARTED) |
user_sanctioned@test.coverpay.com | Fails sanctions screening (SANCTIONS_FLAGGED) |
user_declined@test.coverpay.com | Eligible but all providers decline |
user_partial@test.coverpay.com | Only Klarna and CoverPay approve |
Test Amounts
| Amount (cents) | Scenario |
|---|---|
Any (100–1750000) | Normal flow — providers available based on their min/max |
99 | AMOUNT_TOO_LOW — below all provider minimums |
9999999 | AMOUNT_TOO_HIGH — exceeds all provider maximums |
66600 | Simulated provider timeout (503 response) |
66601 | Simulated network error |
Simulated Providers
In sandbox, all 7 providers are simulated. Checkouts complete instantly without redirecting to real provider pages. The smart router still scores and ranks providers based on your configuration.
CoverPay
Klarna
Affirm
Afterpay
PayPal
Sezzle
Zip
Webhook Testing
Sandbox webhooks fire the same events as production. You can also trigger test events manually from the Dashboard or via the API.
bash
# Send a test webhook event
curl -X POST https://sandbox.coverpayme.com/v1/business/webhooks/{endpointId}/test \
-H "Authorization: Bearer cp_test_your_api_key" \
-H "Content-Type: application/json" \
-d '{"eventType": "checkout.completed"}'Going Live
When you're ready to go live, swap your API key prefix from cp_test_ to cp_live_ and update your base URL to production. No other code changes needed.
!
Launch Checklist
- Replace test API keys with live keys
- Configure webhook endpoints for production URLs
- Verify signature checking is enabled on your webhook handler
- Test the full checkout flow end-to-end
- Ensure error handling covers all error codes