HubtelDevelopers
API referenceDirect Debit

Start a direct debit pre-approval

POST
/api/v2/merchant/{accountNumber}/preapproval/initiate

Asks a customer to approve future debits from their wallet by USSD. The response is pending (2000); the final result is POSTed to callbackUrl after the customer responds on the Virtual Phone or the request expires. Use the same test numbers as Receive Money. After approval you can charge them with Receive Money using a direct-debit channel.

Authorization

basicAuth
AuthorizationBasic <token>

Base64 of API ID:API Key.

In: header

Path Parameters

accountNumber*string

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/v2/merchant/string/preapproval/initiate" \  -H "Content-Type: application/json" \  -d '{    "clientReferenceId": "3jL2KlUy3vt21debitC",    "customerMsisdn": "233200000000",    "channel": "vodafone-gh-direct-debit",    "callbackUrl": "https://webhook.site/b503d1a9-e726-f315254a6ede"  }'

{  "message": "Request received! Pending preapproval",  "responseCode": "2000",  "data": {    "hubtelPreApprovalId": "5f20092321d54eefb974dbfea6de5c34",    "clientReferenceId": "3jL2KlUy3vt21debitC",    "verificationType": "USSD",    "otpPrefix": null,    "preapprovalStatus": "PENDING"  }}