Complete USSD Playground Tutorial: From Setup to Production
Welcome to USSD Playground
USSD Playground is a professional testing platform that lets you test USSD applications without physical devices or live network connections. This comprehensive tutorial will guide you from creating your first project to deploying a production-ready USSD application.
Getting Started
1 Create Your Account
2 Understand the Dashboard
After signing in, you'll see your dashboard with:
Pre-configured banking USSD for testing
Start a new project
Your existing projects
Dashboard, Feedback, Help links
Creating Your First Project
Section 1: Basic Information
Example: "My Banking USSD" or "Airtime Purchase Service"Example: *123# or *920*28#
Note: Must start with * and end with #Example: https://your-api.com/ussd
For local dev: Use ngrok to expose localhost
Example: https://abc123.ngrok.io/ussdSection 2: Gateway Configuration
Generic JSON format (default)
Form-urlencoded with CON/END
JSON with sessionID, msisdn
JSON with uppercase fields (MSISDN, USERDATA)
Request Method:
- POST: Most common (data in body)
- GET: Required for WIGAL, data in URL params
Section 3: Session & Testing
Session Mode:
- IMPLICIT: Server manages state, each request independent
- EXPLICIT: Client manages state, tracks user journey
- HYBRID: Combines both (recommended for flexibility)
Default Phone Number:
Example: +233540000000
Used for testing, can be changed in simulatorNetwork:
- MTN
- Vodafone
- AirtelTigo
- Glo
- Other (custom network)
Click "Create Project"
Your project is created and you're redirected to the simulator!
Using the Phone Emulator
Understanding the Interface
The simulator has three main sections:
- Phone Emulator (Left): Realistic phone interface
- Controls Panel (Right Top): Session controls and settings
- Logs Viewer (Right Bottom): Request/response logs
Starting a Session
- Enter phone number (or use default)
- Click "Start Session" or dial your USSD code
- The phone screen shows your USSD menu
- Type your selection and press "Send"
- Continue interacting until session ends
Phone Emulator Features
Screen Display:
- Shows current USSD message
- Displays "CON" or "END" indicator
- Shows step number
Input Area:
- Type your selection (e.g., "1" or "2")
- Press "Send" to submit
- Press "Cancel" to end session
Status Indicators:
- Green: Session active
- Red: Session ended
- Step counter shows progress
Understanding Session Logs
What Logs Show
Each log entry displays:
- Step Number: Position in session flow
- Timestamp: When request occurred
- Request Payload: Data sent to your endpoint
- Response Data: What your endpoint returned
- Parsed State: Whether session continues or ends
Expanding Log Details
Click any log entry to see:
Request:
{
"sessionId": "sess_abc123",
"phoneNumber": "+233540000000",
"text": "1*2",
"serviceCode": "*123#"
}
Response:
{
"message": "Enter amount:",
"continueSession": true
}
Parsed:
- Message: "Enter amount:"
- Should Continue: true
- Step: 3Using Logs for Debugging
- Check Request Format: Verify your endpoint receives correct data
- Inspect Response: Ensure your app returns proper format
- Track Session Flow: Follow user journey step by step
- Identify Errors: Spot where things go wrong
- Verify Session Control: Confirm CON/END logic works
Testing Different Scenarios
Happy Path Testing
Test the expected user journey:
1. Dial *123#
2. See main menu
3. Select option 1
4. See submenu
5. Complete action
6. See confirmation
7. Session endsError Scenario Testing
Test edge cases:
- Invalid Input: Enter "abc" when number expected
- Out of Range: Select option 9 when only 1-3 exist
- Empty Input: Press send without typing
- Back Navigation: Test going back to previous menu
- Session Timeout: Wait without input (30-90 seconds)
Multiple Network Testing
Change network in controls panel to test:
- MTN-specific behavior
- Vodafone compatibility
- AirtelTigo integration
Debugging Common Issues
Issue: "Session ended unexpectedly"
Possible Causes:
- Your endpoint returned END instead of CON
- continueSession set to false
- Session timeout occurred
- Network error
Solution:
- Check logs for last response
- Verify session control logic
- Ensure proper CON/END prefix or boolean
- Check endpoint error handling
Issue: "Menu not displaying correctly"
Possible Causes:
- Missing newline characters (\n)
- Message too long (>182 characters)
- Special characters not escaped
Solution:
- Add \n between menu items
- Shorten message or split into multiple screens
- Test with simple text first
Issue: "User input not received"
Possible Causes:
- Endpoint not parsing text field correctly
- Session ID mismatch
- Request format mismatch
Solution:
- Check request logs for text field
- Verify sessionId consistency
- Confirm endpoint format matches project settings
Issue: "Endpoint not responding"
Possible Causes:
- Endpoint URL incorrect
- Server not running
- Firewall blocking requests
- SSL certificate issues
Solution:
- Verify URL is accessible (test with cURL)
- Check server logs
- Ensure HTTPS for production
- Test with ngrok for local dev
Advanced Features
Using Custom Gateway Builder
For non-standard providers:
- Select "CUSTOM" as endpoint format
- Click "Configure Custom Gateway"
- Set up field mappings
- Configure response parsing
- Add authentication if needed
- Test with test harness
See our Custom Gateway Builder Guide for details.
Testing with Demo Project
Try the pre-configured demo:
- Click on "Demo Banking USSD" project
- Explore the banking menu
- Test balance check, transfers, etc.
- Review logs to understand flow
- Use as reference for your project
Editing Project Settings
To modify your project:
- Go to Dashboard
- Click "Edit" on project card
- Update any settings
- Click "Update Project"
- Changes apply immediately
Best Practices for Production
1. Thorough Testing
- Test all menu paths
- Verify error handling
- Test with different networks
- Simulate timeouts
- Load test with multiple sessions
2. Optimize Performance
- Keep menus simple (5-7 options max)
- Minimize external API calls
- Cache frequently accessed data
- Use efficient database queries
- Implement proper session management
3. Error Handling
- Validate all user inputs
- Provide clear error messages
- Handle network timeouts gracefully
- Log errors for debugging
- Implement fallback mechanisms
4. User Experience
- Use clear, simple language
- Provide navigation options (Back, Home)
- Show progress indicators
- Confirm important actions
- Keep messages under 160 characters
5. Security
- Validate session IDs
- Implement rate limiting
- Sanitize user inputs
- Use HTTPS for all endpoints
- Don't expose sensitive data in logs
Deploying to Production
Pre-Deployment Checklist
- ✅ All features tested thoroughly
- ✅ Error handling implemented
- ✅ Performance optimized
- ✅ Security measures in place
- ✅ Monitoring and logging set up
- ✅ Backup and recovery plan ready
- ✅ Documentation complete
Deployment Steps
- Deploy your endpoint: Use reliable hosting (AWS, Heroku, DigitalOcean)
- Configure production URL: Update project with production endpoint
- Test in production: Use USSD Playground with production URL
- Register with USSD provider: Submit your USSD code and endpoint
- Provider testing: Work with provider to test integration
- Go live: Provider activates your USSD code
- Monitor: Watch logs and analytics
Post-Deployment
- Monitor error rates
- Track user behavior
- Gather user feedback
- Iterate and improve
- Keep testing with USSD Playground
Tips and Tricks
Keyboard Shortcuts
- Enter: Send input (in phone emulator)
- Esc: Cancel session
- Ctrl/Cmd + K: Clear logs
Quick Actions
- Double-click log entry: Copy to clipboard
- Right-click phone screen: Copy displayed text
- Click step number: Jump to that step in logs
Testing Efficiency
- Save common test scenarios
- Use realistic test data
- Test incrementally as you build
- Keep a testing checklist
- Document edge cases
Getting Help
Resources Available
- Help & Docs: Comprehensive documentation
- Blog: Tutorials and guides
- Feedback: Report bugs or request features
- Demo Project: Working example to learn from
Common Questions
Q: Can I test locally?
A: Yes! Use ngrok or similar tools to expose your localhost.
Q: Are there usage limits?
A: Free tier includes 10 steps per session, 30 requests/minute.
Q: Can I test multiple projects?
A: Yes! Create unlimited projects.
Q: Is my data secure?
A: Yes! All data is encrypted and private to your account.
Q: Can I share projects with my team?
A: Team features coming soon!
Next Steps
Now that you know how to use USSD Playground:
- Create your first project with your actual endpoint
- Test thoroughly using the simulator
- Debug with logs to perfect your flow
- Explore advanced features like custom gateway builder
- Deploy to production with confidence
Conclusion
USSD Playground makes USSD development faster, easier, and more reliable. With features like:
- Real-time phone emulator
- Comprehensive logging
- Multiple gateway support
- Custom gateway builder
- No setup required
You can build and test USSD applications efficiently without needing physical devices or live network connections.
Ready to start building? Create your first project now and experience the easiest way to develop USSD applications!
Build Your USSD App Today
Start testing with our free USSD simulator. No credit card required. Get started in minutes.
Get Started FreeJoin hundreds of developers building USSD applications