Online Checkout
Create a Hubtel-hosted checkout page where your customer pays by mobile money, card or Hubtel wallet.
Host: payproxyapi.hubtel.com. No IP allowlist needed.
Authenticate with your API ID and API Key. See Authentication and accounts.
| Operation | Request |
|---|---|
| Create a checkout | POST /items/initiate |
Response codes
The codes this service returns in ResponseCode, as documented for production. Codes shared by all payment APIs are also explained in Errors.
| Response Code | Description | Required Action |
|---|---|---|
0000 | This ResponseCode in the initial response means the request has been accepted, you can proceed with the transaction with any of the URLs provided in this initial response. | None |
0000 | This ResponseCode in the callback means the transaction has been processed successfully. | None |
0005 | There was an HTTP failure/exception when reaching the payment partner | The transaction state is not known. Please contact your Retail Systems Engineer to confirm the status of this transaction. |
2001 | Transaction failed due to an error with the Payment Processor. Please review your request or retry in a few minutes; The MTN Mobile Money user has reached counter or balance limits, has insufficient funds or is missing permissions.; MTN Exception: Account Holder with FRI Not Found; Transaction id is invalid; Decline - General decline of the card. No other information provided by the issuing bank. | Customer either entered no or invalid PIN; Mobile network not able to parse your request; USSD session timeout; Having strange characters (&\*!%@) in your description; Ensure that the number provided matches the channel |
4000 | Validation errors | Validation errors. Something is not quite right with this request. Please check again. |
4070 | We're unable to complete this payment at the moment. Please try again later. Fees not set for given conditions. | Ensure you are passing the required minimum amount or contact your Hubtel relationship manager to setup fees for your account if error persists. |
Get an invoice's status GET
Returns whether an invoice is paid or unpaid and the payment details. Use it to reconcile if the invoice callback didn't arrive.
Create a checkout POST
Creates a hosted checkout and returns a `checkoutUrl` to redirect your customer to, plus a `checkoutDirectUrl` for embedding. The customer chooses mobile money, card or Hubtel wallet on Hubtel's page. The final result arrives at `callbackUrl`; never fulfil an order from the `returnUrl` redirect alone.