# Callback reference (/docs/callbacks)



The examples below show each product’s payload independently; their IDs and amounts are not a single transaction. A dash in the address column means the source address is not published—confirm it with Hubtel before launch.

Hubtel POSTs a JSON body to the callback URL you set in the request. The table shows where the final status is and which address sends it. For how to handle callbacks safely, see [Webhooks and callbacks](/docs/webhooks).

| Product                                                                         | Callback URL field                                                     | Final status                                                      | Comes from                                      |
| ------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------- |
| [Receive Money](#receive-money), Direct Debit charges                           | `PrimaryCallbackUrl`                                                   | `ResponseCode`: `0000` paid, `2001` failed                        | `18.202.122.131`                                |
| [Online Checkout](#checkout)                                                    | `callbackUrl`                                                          | `ResponseCode` and `Status`                                       | `108.129.40.25`                                 |
| [Checkout SDK](/docs/guides/checkout-sdk#callback)                              | `callbackUrl`                                                          | `ResponseCode`: `0000` paid, `2001` failed (Receive Money format) | `108.129.40.25`                                 |
| [Send Money, Send to Bank](#payouts)                                            | `PrimaryCallbackURL` (Send Money), `PrimaryCallbackUrl` (Send to Bank) | `ResponseCode`: `0000` paid out                                   | `18.202.122.131`                                |
| [Balance transfer](#transfers)                                                  | `PrimaryCallbackUrl`                                                   | `ResponseCode`: `0000` transferred                                | —                                               |
| [Refund](#refunds)                                                              | `callbackUrl`                                                          | `responseCode`: `0000` refunded                                   | —                                               |
| [Direct Debit pre-approval](#preapproval)                                       | `callbackUrl`                                                          | `PreapprovalStatus`: `APPROVED` or `FAILED`                       | `18.202.122.131`                                |
| [Invoicing](#invoicing)                                                         | `callbackUrl`                                                          | `Status`: `Successful` or `Failed`                                | `18.202.122.131`                                |
| [Recurring Invoice](#recurring-invoice)                                         | `callbackUrl`                                                          | `ResponseCode`: `0000` paid, `2001` failed                        | `34.241.57.109`                                 |
| [Commission services](#commission-services)                                     | `CallbackUrl`                                                          | `ResponseCode`: `0000` delivered                                  | `18.202.122.131`                                |
| [Programmable Services](/docs/guides/service-fulfilment#receive-the-paid-order) | Service Fulfilment URL                                                 | `OrderInfo.Status`: `Paid`                                        | `52.50.116.54`, `18.202.122.131`, `52.31.15.68` |

## Receive Money [#receive-money]

```json
{
  "ResponseCode": "0000",
  "Message": "success",
  "Data": {
    "Amount": 0.8,
    "Charges": 0.05,
    "AmountAfterCharges": 0.8,
    "Description": "The Vodafone Cash payment has been approved and processed successfully",
    "ClientReference": "3jL2KlUy3vt21",
    "TransactionId": "09f84e20a283942e807128e8c21d08d6",
    "ExternalTransactionId": "2116938399",
    "AmountCharged": 0.85,
    "OrderId": "09f84e20a283942e807128e8c21d08d6",
    "PaymentDate": "2024-05-14T00:44:57.5142719Z"
  }
}
```

A failed payment has `"ResponseCode": "2001"` and `"Message": "failed"`. Keep `OrderId` (or `TransactionId`): a [refund](/docs/guides/refunds) needs it.

## Online Checkout [#checkout]

```json
{
  "ResponseCode": "0000",
  "Status": "Success",
  "Data": {
    "CheckoutId": "59e2fbbff4e443b98e09346881ac7e9a",
    "SalesInvoiceId": "e96ccfb4746045bba13f425bd573a31c",
    "ClientReference": "Kaks545253",
    "Status": "Success",
    "Amount": 0.5,
    "CustomerPhoneNumber": "233242825109",
    "PaymentDetails": { "MobileMoneyNumber": "233242825109", "PaymentType": "mobilemoney", "Channel": "mtn-gh" },
    "Description": "The MTN Mobile Money payment has been approved and processed successfully."
  }
}
```

## Send Money and Send to Bank [#payouts]

```json
{
  "ResponseCode": "0000",
  "Data": {
    "AmountDebited": 10.1,
    "TransactionId": "8a545e5c7357714b80b65f76",
    "ClientReference": "25335r45pch53544044",
    "Description": "The MTN Mobile Money payment has been approved and processed successfully.",
    "ExternalTransactionId": "6654233478",
    "Amount": 10,
    "Charges": 0.1,
    "Meta": null,
    "RecipientName": "John Doe"
  }
}
```

A payout your disbursement balance can't cover has `"ResponseCode": "4075"` and `"Description": "Insufficient prepaid balance."`.

## Balance transfer [#transfers]

```json
{
  "ResponseCode": "0000",
  "Message": "Success",
  "Data": { "ClientReference": "b03202ef49", "Description": "Hubtel Transfer Test", "Amount": 0.8, "Charges": null, "Meta": null, "RecipientName": "gershon" }
}
```

## Refund [#refunds]

```json
{
  "responseCode": "0000",
  "message": "Successful",
  "data": { "amount": 0.5, "charges": 0.01, "orderId": "a4e406711db74687bbd307ead23bd015", "externalTransactionId": "0000002673867446" }
}
```

## Direct Debit pre-approval [#preapproval]

```json
{
  "CustomerMsisdn": "233200000000",
  "VerificationType": "USSD",
  "PreapprovalStatus": "APPROVED",
  "HubtelPreapprovalId": "5f20092321d54eefb974dbfea6de5c34",
  "ClientReferenceId": "3jL2KlUy3vt21debitC",
  "CreatedAt": "2022-11-14T21:08:16.7533466Z"
}
```

## Invoicing [#invoicing]

```json
{
  "Status": "Successful",
  "ResponseCode": "0000",
  "Data": {
    "AmountPaid": 1,
    "InvoiceId": "pY3HfCTXZb",
    "ReceiptNumber": "748f4a9f0d664369899a74c820d95c21",
    "Description": "The MTN Mobile Money payment has been approved and processed successfully.",
    "PaymentMethod": "mobilemoney",
    "PaymentChannel": "mtn-gh",
    "PayeePhoneNumber": "233555654321",
    "PaymentDetailId": "f41ce50e-a966-4bf6-87b6-869065736f01"
  }
}
```

A failed invoice payment has `"Status": "Failed"`.

## Recurring Invoice [#recurring-invoice]

```json
{
  "ResponseCode": "0000",
  "Message": "Success",
  "Data": {
    "OrderId": "1d0e06bc689c4de2bb87a54829a89640",
    "Description": "My recurring service",
    "RecurringInvoiceId": "8ae267e31af748d4934b0420be6f47f0",
    "TransactionId": "5814152092296267804084",
    "ClientReference": "8ae267e31af748d4934b0420be6f47f0",
    "ExternalTransactionId": "5814152092296267804084",
    "CustomerMobileNumber": "233246912184",
    "Amount": 0.2,
    "Charges": 0.01,
    "AmountAfterCharges": 0.19,
    "AmountCharged": 0.2,
    "InitialAmount": 0.2,
    "RecurringAmount": 0.1
  }
}
```

Each instalment sends its own callback. A failed instalment has `"ResponseCode": "2001"`.

## Commission services [#commission-services]

```json
{
  "ResponseCode": "0000",
  "Data": {
    "AmountDebited": 0.5,
    "TransactionId": "5b40e2e40fd4441d80b69b352f3103c7",
    "ClientReference": "TestDATA01013",
    "Description": "GHC 0.50 (data_bundle_1) has been sent to 233242825109 on January 24, 2024.",
    "ExternalTransactionId": "2024012416592042208544402",
    "Amount": 0.5,
    "Charges": 0,
    "Meta": { "Commission": "0.0198" },
    "RecipientName": null
  }
}
```
