Back to Editorial

Engineering7 min read
Hubtel USSD Integration Guide: Building for Scale
Asterisks Engineering
Core Team ·

Why Integrate with Hubtel?
Hubtel is a powerhouse in the Ghanaian fintech space. Their USSD gateway is highly reliable and integrates deeply with their payment processing capabilities.
The Hubtel Request Lifecycle
When a user dials your shortcode, Hubtel sends a POST request to your endpoint. The payload typically includes:
SessionId: A unique identifier for the user's session.Mobile: The user's phone number.Type: Whether it's a new session (Initiation) or a response (Response).Message: The user's input.
Handling Responses
Hubtel expects a JSON response with specific fields like Type (Release or Response) and Message.
"Pro Tip: Always use a 'Release' type for the final screen to ensure the session is closed properly on the telco side."
Scaling with Asterisks
While you can build this manually, the Asterisks Hubtel Connector automates the boilerplate.
- Automatic session mapping.
- Built-in error handling for Hubtel's specific error codes.
- Seamless integration with Hubtel's payment APIs.
By offloading the gateway-specific logic to Asterisks, your team can focus on the business logic that actually matters.
Topics
- USSD
- Hubtel
- Ghana
- API Integration
- Engineering

