Hubtel

Connect StarHash to Hubtel for USSD services in Ghana.

Hubtel

Hubtel is a leading payment and communications platform in Ghana offering USSD services.

Supported Countries

CountryNetworks
GhanaMTN, Vodafone, AirtelTigo

Prerequisites

  1. A Hubtel developer account
  2. A USSD shortcode
  3. Client ID and Secret from your dashboard

Setup Steps

Step 1: Get Your Credentials

  1. Log in to Hubtel Developer Portal
  2. Go to Applications → Your app
  3. Copy your Client ID and Client Secret

Step 2: Configure in StarHash

  1. In StarHash Studio, go to SettingsProviders
  2. Click Add Provider
  3. Select Hubtel
  4. Enter your credentials:
FieldValue
Client IDYour Hubtel client ID
Client SecretYour client secret
ShortcodeYour USSD shortcode
  1. Click Save

Step 3: Set Up Callback URL

  1. In Hubtel Developer Portal, go to USSDApplications
  2. Edit your USSD application
  3. Set the callback URL:
https://api.starhash.dev/hooks/hubtel/{instance_id}
  1. Save your changes

Step 4: Deploy Your Flow

  1. In StarHash Studio, open your flow
  2. Click Deploy
  3. Select the Hubtel instance
  4. Click Publish

Session Timeout

Sessions timeout after 2 minutes of inactivity. Design flows for shorter sessions compared to other providers.

Troubleshooting

IssueCauseSolution
Unauthorized errorInvalid credentialsCheck Client ID/Secret
Callback not foundInvalid URLVerify the callback URL
Response timeoutSlow responseOptimize flow speed

Mobile Money Integration

Hubtel excels at mobile money integration:

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:

ConditionThen go to
paymentStatus == "success"Payment Success node
(default)Payment Failed node

Best Practices

  1. Shorter flows - Hubtel has 2-minute timeout
  2. Handle Release - Gracefully end when user cancels
  3. Use ClientState - Persist data between requests
  4. Integrate payments - Leverage Hubtel's payment APIs

Pricing

Contact Hubtel for current pricing:

  • Per-session charges apply
  • Additional charges for payment integrations
  • Volume discounts available