Create a recurring invoice
Starts a recurring mobile-money invoice. The response is pending (0001) with a requestId and otpPrefix; the OTP lands on the Virtual Phone. After Verify a recurring invoice and the customer approves the prompt, the initial debit result is POSTed to callbackUrl. Use the same test numbers as Receive Money.
Authorization
basicAuth Base64 of API ID:API Key.
In: header
Path Parameters
Your collection account number (POS sales), where customer payments land. Find it in your Hubtel merchant account under Programmable keys → Account ID. In the sandbox, use the collection account in Workbench.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/api/proxy/string/create-invoice" \ -H "Content-Type: application/json" \ -d '{ "orderDate": "2022-01-28T08:57:00", "invoiceEndDate": "2022-01-31T08:57:00", "description": "My recurring service", "startTime": "14:00", "paymentInterval": "DAILY", "customerMobileNumber": "233240000000", "paymentOption": "MobileMoney", "channel": "mtn_gh_rec", "customerName": "Joe Doe", "recurringAmount": 0.1, "totalAmount": 0.1, "initialAmount": 0.1, "currency": "GHS", "callbackUrl": "https://webhook.site/b503d1a9-e726-f315254a6ede" }'{ "responseCode": "0001", "message": "Your request has been processed successfully.", "data": { "recurringInvoiceId": "0f84e20a2839482e807128e8c21d08d6", "requestId": "a6487bc44eae44849fd80326a0dd802a", "otpPrefix": "OQDM" }}Cancel a recurring invoice DELETE
Stops a recurring invoice so no further instalments are collected. A cancellation callback (`0005`) is POSTed to the invoice's `callbackUrl`. Instalments already collected are not refunded; use Refunds for that.
Verify a recurring invoice POST
Completes setup with the OTP from create (`otpPrefix-0000` in the sandbox). Hubtel then prompts the customer; the initial debit callback arrives at the `callbackUrl` from create after they respond or the request expires.