Online Checkout

The Online Checkout API allows merchants to accept online payment for goods and services using mobile money and credit/debit cards on a checkout page.

The API presents RESTful endpoints that make it easy to integrate online payment into any application.

To use this API, you are required to have a Hubtel Account. You can learn how to sign up for a free account here.

How The Checkout Works

  1. A customer arrives on your website and clicks on a payment button.
  2. The customer is then presented with the Hubtel checkout page.
  3. The customer is required to complete a two-factor verification process.
  4. The customer proceeds to choose a suitable payment option and provides the required payment details.
  5. When payment is completed, a success or failure notification is presented to the customer.
  6. The customer is finally redirected back to your website if you have provided a redirect URL.

API Request Flow

Online Request Flow

Online Request Flow

API Request Flow

  1. Your app makes an HTTP POST request to the Online Checkout API to create an invoice.
  2. Your app receives a response with an invoice token and the checkout redirect URL.
  3. Your app then, directs the customer to the Hubtel checkout page using the URL with the invoice token it received.
  4. After payment is fulfilled, the customer is redirected back to your website.
  5. The merchant app receives a callback notification on the status of the invoice created.
  6. The checkout invoice has three (3) statuses: pending, completed and cancelled.

Orders

The Online Checkout API has been designed to allow clients who offer Pay-On-Delivery services to also have their customers order for goods without paying directly. Customers see an additional ORDER button which sends an Order request to your application.

You will need to build your app to understand the response code associated with Orders so as not to give direct value for items not purchased. You can view the response codes in the API reference here as well as a sample order response to your callbackURL here.

Authentication

Requests to the checkout API endpoints are authenticated using Basic Authentication.

Try This API

Online Checkout


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.