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.
- A customer arrives on your website and clicks on a payment button.
- The customer is then presented with the Hubtel checkout page.
- The customer is required to complete a two-factor verification process.
- The customer proceeds to choose a suitable payment option and provides the required payment details.
- When payment is completed, a success or failure notification is presented to the customer.
- The customer is finally redirected back to your website if you have provided a redirect URL.
Online Request Flow
API Request Flow
- Your app makes an HTTP POST request to the Online Checkout API to create an invoice.
- Your app receives a response with an invoice token and the checkout redirect URL.
- Your app then, directs the customer to the Hubtel checkout page using the URL with the invoice token it received.
- After payment is fulfilled, the customer is redirected back to your website.
- The merchant app receives a callback notification on the status of the invoice created.
- The checkout invoice has three (3) statuses: pending, completed and cancelled.
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.
Requests to the checkout API endpoints are authenticated using Basic Authentication.