Create a checkout
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.
Authorization
basicAuth Base64 of API ID:API Key.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
Callbacks
curl -X POST "https://example.com/items/initiate" \ -H "Content-Type: application/json" \ -d '{ "totalAmount": 100, "description": "Book Shop Checkout", "callbackUrl": "https://webhook.site/8b4bbd0a-5f98-4b3d-abbe-b9b49767f7d5", "returnUrl": "http://hubtel.com/online", "merchantAccountNumber": "11684", "cancellationUrl": "http://hubtel.com/online", "clientReference": "inv0012" }'{ "responseCode": "0000", "status": "Success", "data": { "checkoutUrl": "https://pay.hubtel.com/7569a11e8b784f21baa9443b3fce31ed", "checkoutId": "7569a11e8b784f21baa9443b3fce31ed", "clientReference": "inv0012", "message": "", "checkoutDirectUrl": "https://pay.hubtel.com/7569a11e8b784f21baa9443b3fce31ed/direct" }}