Hubtel
Connect StarHash to Hubtel for USSD services in Ghana.
Hubtel
Hubtel is a leading payment and communications platform in Ghana offering USSD services.
Step 1: Get Your Credentials
- Log in to Hubtel Developer Portal
- Go to Applications → Your app
- Copy your Client ID and Client Secret
Step 2: Configure in StarHash
- In StarHash Studio, go to Settings → Providers
- Click Add Provider
- Select Hubtel
- Enter your credentials:
| Field | Value |
|---|---|
| Client ID | Your Hubtel client ID |
| Client Secret | Your client secret |
| Shortcode | Your USSD shortcode |
- Click Save
Step 3: Set Up Callback URL
- In Hubtel Developer Portal, go to USSD → Applications
- Edit your USSD application
- Set the callback URL:
https://api.starhash.dev/hooks/hubtel/{instance_id}
- Save your changes
Step 4: Deploy Your Flow
- In StarHash Studio, open your flow
- Click Deploy
- Select the Hubtel instance
- Click Publish
Session Timeout
Sessions timeout after 2 minutes of inactivity. Design flows for shorter sessions compared to other providers.
Troubleshooting
| Issue | Cause | Solution |
|---|---|---|
| Unauthorized error | Invalid credentials | Check Client ID/Secret |
| Callback not found | Invalid URL | Verify the callback URL |
| Response timeout | Slow response | Optimize flow speed |
Payment Prompts
Trigger mobile money payments from Action nodes:
{
"actionType": "hubtel_payment",
"config": {
"amount": "${amount}",
"phone": "${phone}",
"description": "Payment for service"
}
}
Payment Status
Check payment status in your flow using a Branch node:
| Condition | Then go to |
|---|---|
paymentStatus == "success" | Payment Success node |
| (default) | Payment Failed node |
Best Practices
- Shorter flows - Hubtel has 2-minute timeout
- Handle Release - Gracefully end when user cancels
- Use ClientState - Persist data between requests
- Integrate payments - Leverage Hubtel's payment APIs

