Sandbox vs Production Mode
Yabetoo provides two distinct environments for safe development and testing.Sandbox (Test)
Test environment for development. No real transactions are made.Key prefix:
sk_test_Production (Live)
Production environment for real transactions.Key prefix:
sk_live_API Keys Configuration
Recommended Environment Variables
Create a.env file at the root of your project:
.env
Usage in Your Code
Test Phone Numbers
In sandbox mode, use these phone numbers to simulate different scenarios:Testing Webhooks Locally
To receive webhooks locally, use a tunneling tool like ngrok:1
Install ngrok
2
Expose your local server
https://abc123.ngrok.io3
Configure the webhook in the Dashboard
Go to Settings > Webhooks and add your ngrok URL:
Verify Webhook Signatures
Always verify webhook signatures to ensure they come from Yabetoo:Best Practices
Error Handling
Error Handling
Always implement robust error handling:
Idempotency
Idempotency
Use idempotency keys to avoid duplicates on retry:
Logging and Monitoring
Logging and Monitoring
Log all transactions for debugging:
Pre-Production Checklist
Before going live, verify:1
Complete Testing
- Test all payment scenarios (success, failure, pending)
- Test webhook reception and processing
- Test refunds and cancellations
2
Security
- API keys stored in environment variables
- Webhook signature verification implemented
- HTTPS enabled on all endpoints
3
Configuration
- Production callback URLs configured
- Webhooks pointing to production server
- Production keys (
sk_live_) in place
Useful Resources
Postman Collection
Quickly test the API with our Postman collection
API Reference
Complete API documentation
Error Handling
List of error codes and solutions
Webhooks
Webhook configuration and management