Testing Guide
LuxCore provides a test mode that allows you to simulate transactions without processing real money. This guide covers how to use test mode effectively.Test vs Production Mode
Test and production use the same API endpoint. The environment is determined by your API key prefix.
| Key Prefix | Environment | Behavior |
|---|---|---|
qp_test_* | Test | Simulated transactions, no real money |
qp_prod_* | Production | Real transactions, actual money movement |
Getting Test API Keys
Test API keys are provided by the LuxCore team during onboarding. Once you have access:- Log in to your Merchant Dashboard
- Navigate to Settings → API Keys
- Copy your test API key (starts with
qp_test_)
Contact developers@lux-core.io if you need test API keys.
Test Mode Behavior
Payments
- Payments are created and go through normal status transitions
- No actual bank transfers or card charges occur
- Webhooks are delivered normally
- All API responses mirror production behavior
Balance
- Test mode uses a separate test balance
- Initial test balance may be pre-funded for testing
- Balance changes reflect test transactions only
Webhooks
- Webhooks are delivered to your configured endpoints
- Use webhook testing to verify your integration
- Same signature verification as production
Simulating Payment Scenarios
Successful Deposit
Create a deposit payment - it will transition tocompleted status:
Successful Withdrawal
Create a withdrawal payment (requires sufficient test balance):Testing Webhooks
Send Test Event
Use the test endpoint to send a test webhook to your server:Local Development
For local development, use a tunneling service like ngrok to expose your local server:Integration Checklist
Before going live, verify your integration handles these scenarios:Payment Creation
Payment Creation
- Create deposit payments successfully
- Create withdrawal payments successfully
- Handle validation errors gracefully
- Store transaction IDs for tracking
Payment Status
Payment Status
- Retrieve payment status by ID
- List payments with filters
- Cancel pending payments
Webhooks
Webhooks
- Receive webhook notifications
- Verify webhook signatures
- Handle
payment.completedevents - Handle
payment.failedevents - Process events idempotently
Error Handling
Error Handling
- Handle 401 (unauthorized) errors
- Handle 400 (bad request) errors
- Handle 429 (rate limit) errors
- Handle network timeouts
Balance
Balance
- Check balance before withdrawals
- Handle insufficient balance errors
Going Live
1
Complete Testing
Ensure all checklist items pass in test mode
2
Request Live API Key
Contact your LuxCore account manager or developers@lux-core.io to request production credentials
3
Update Configuration
Replace test API key with live API key in your production environment
4
Update Webhook URLs
Ensure webhooks point to your production server
5
Monitor
Watch the dashboard for your first live transactions
Common Testing Mistakes
Using Live Keys in Dev
Always use test keys (
qp_test_*) in developmentSkipping Webhook Verification
Always verify signatures, even in test mode
Not Testing Errors
Test error scenarios, not just happy paths
Hardcoding Keys
Use environment variables for API keys
Need Help?
Developer Support
Contact our team if you have questions about testing
