Testing
SpacePay offers comprehensive testing environments and scenarios to ensure your integration works correctly before going live.Environments
SpacePay offers two separate environments for development and production:Testnet Environment
Networks: Base Sepolia, Ethereum SepoliaUse for: Development and testingAPI Keys:
pk_test_..., sk_test_...Base URL: https://api-testnet.spacepay.co.ukMainnet Environment
Networks: Base, Ethereum, Polygon, BSC, AvalancheUse for: Production with real tokensAPI Keys:
pk_..., sk_...Base URL: https://api.spacepay.co.ukTest Scenarios
Successful Payment
Send the exact amount specified in the payment request. Payment will be marked as successful after confirmation.
Underpayment
Send less than the required amount. Payment will be marked as failed due to
insufficient funds.
Overpayment
Send more than the required amount. Payment will be marked as successful with
the excess amount noted.
No Payment
Don’t send any payment within the timeout period. Payment will expire and be marked as failed.
Testing Checklist
1
Environment Setup
- Obtain testnet API keys
- Configure your application for testnet
- Set up webhook endpoint for testing
2
Payment Flow Testing
- Test payment creation
- Test payment status updates
- Verify webhook delivery
3
Error Handling
- Test invalid API keys
- Test network timeouts
- Test webhook signature verification
4
Edge Cases
- Test payment expiration
- Test duplicate payments
- Test different token amounts
- Test multiple concurrent payments
Test Data
Testnet Tokens
Ethereum Sepolia Testnet (Chain ID: 11155111)
Ethereum Sepolia Testnet (Chain ID: 11155111)
- ETH: Native token (
0x0000000000000000000000000000000000000000) - USDC:
0xcae5e5b4a5dd769b021f9f93257b44b0742f77d3 - USDT:
0xd14fce5bc55861c3b71bdea38d22590df8666dbc
Base Sepolia Testnet (Chain ID: 84532)
Base Sepolia Testnet (Chain ID: 84532)
- ETH: Native token (
0x0000000000000000000000000000000000000000) - USDC:
0x00fc61d7de7655db3984db634e3489130ebeacf6 - USDT:
0xe290136a17a1804d4e538bd747b7a48d1a44a629
Going Live Checklist
1
Switch to Production
- Update API base URL to production
- Replace test API keys with production keys
- Update webhook URLs to production endpoints
2
Final Verification
- Test with small real payments
- Verify webhook delivery in production
- Confirm payment status updates
- Test error handling scenarios
3
Monitor and Support
- Set up monitoring for webhook failures
- Configure alerts for payment issues