# Requests and responses (/docs/conventions)



## Client references [#client-reference]

For APIs that accept `ClientReference` (or `clientReference`), use it to match requests with callbacks and status checks. Invoicing and pre-approval use different identifiers; follow their guides.

* Make it unique for every transaction, and never reuse one. Use your order or payout ID.
* Use letters and digits. Receive Money accepts up to **36 characters** and Online Checkout up to **32**.
* If a request times out, don't send it again with a new reference. [Check the status](/docs/guides/reconciliation) with the reference you sent first, then decide.

## Amounts and fees [#amounts]

Amounts are in Ghana cedis (GHS) with at most **2 decimal places**, for example `0.50`.

Responses and callbacks report fees separately:

| Field                | Meaning                                                         |
| -------------------- | --------------------------------------------------------------- |
| `Amount`             | The amount in your request.                                     |
| `Charges`            | Hubtel's fee for the transaction.                               |
| `AmountAfterCharges` | What reaches your account after the fee.                        |
| `AmountCharged`      | What the customer paid.                                         |
| `AmountDebited`      | For payouts: what left your disbursement account, fee included. |

## Phone numbers [#phone-numbers]

Send mobile numbers in international format without `+`, for example `233249111411`.

## Mobile money channels [#channels]

| Network    | Receive and Send Money | Direct Debit               | Recurring Invoice |
| ---------- | ---------------------- | -------------------------- | ----------------- |
| MTN        | `mtn-gh`               | `mtn-gh-direct-debit`      | `mtn_gh_rec`      |
| Telecel    | `vodafone-gh`          | `vodafone-gh-direct-debit` | `vodafone_gh_rec` |
| AirtelTigo | `tigo-gh`              | —                          | —                 |

The channel must match the number's network.

## Field casing [#casing]

Field names are case-sensitive and differ between APIs. Copy them from the API reference.

* Receive Money, Send Money, Send to Bank and their callbacks use PascalCase: `ResponseCode`, `Data`, `ClientReference`. So do Online Checkout callbacks.
* Status checks, Online Checkout requests, refunds, balances and Direct Debit pre-approval use camelCase: `responseCode`, `data`, `clientReference`.

## Asynchronous results [#async]

Payments, payouts, transfers, refunds and commission services complete asynchronously:

1. Read the result using the field and codes documented for that operation. Receive Money, payouts, transfers and refunds return `0001` for an accepted, pending request. Online Checkout returns `0000` when the checkout is created; this does not confirm payment.
2. Hubtel sends the final result to your callback URL. See the [callback reference](/docs/callbacks).
3. If no final result arrives within 5 minutes, use the [status check for that product](/docs/guides/reconciliation#transaction-status).

## Rate limits [#rate-limits]

Send requests at a steady pace rather than in bursts, and wait before you retry a failed request. If you expect high volumes, tell your Retail Systems Engineer before you go live.
