Initiate Transfer API

Environment: Live

Send money to mobile money or bank accounts.

# Initiate Transfer API

Send money to a Mobile Money or Bank Account instantly.

## Endpoint
- **Method**: POST
- **URL**: https://api.moolre.com/open/transact/transfer

## Headers
| Header | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| X-API-USER | string | Yes | Your Moolre username. |
| X-API-KEY | string | Yes | Your API Key (Private Key only). |
| Idempotency-Key | string | No | Optional. 1 to 128 printable characters. Repeating the request with the same key and body returns the stored response (with meta.replayed true) for 24 hours; a different body returns IDEM01. See Idempotency. |

## Request Body
| Parameter | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| type | integer | Yes | Must be 1. |
| channel | string | Yes | Channel name: MTN, TELECEL, AT, BANK (Instant Bank Transfer) or GHQR. The numeric ids 1, 6, 7, 2 and 13 still work but are deprecated and return a notice. |
| currency | string | Yes | Currency code: GHS (Ghana Cedis) or NGN (Nigerian Naira). |
| amount | string | Yes | Amount to transfer. Must be greater than 0. |
| receiver | string | Yes | Recipient mobile number (begin with 0) or bank account number. |
| sublistid | string | No | Required when channel is 2 (Instant Bank Transfer). Use the bank code returned by Get banks. |
| externalref | string | Yes | Unique reference for the transfer: 1 to 128 characters, unique on the wallet (case-insensitive). Sending a transfer again with an externalref already used never pays twice: the reply is the original transfer (PY04, or PY05 with txstatus 2 when it failed). |
| reference | string | No | Optional message/reference. |
| sendername | string | No | Optional name shown to the recipient as the sender, 2 to 30 characters: letters, spaces and . ' - only. Omit it to use the default. |
| accountnumber | string | Yes | Your Moolre Account Number. |

## Response (200 Success)
Transfer request received.

```json
{
  "status": "1",
  "code": "OBGH01",
  "message": [
    "Pay out Successful",
    "Click close to view transactions."
  ],
  "data": {
    "txstatus": 1,
    "receiver": "0240000007",
    "transactionid": "32759150",
    "externalref": "28171451",
    "thirdpartyref": "901733241086",
    "receivername": "YUSIF YA-ADZAGEY",
    "amount": "1",
    "amountfee": "1.01",
    "networkfee": "0.00",
    "fee": "0.01"
  },
  "go": null,
  "meta": {
    "requestid": "req_c68f4c66115c26725c796242",
    "notices": []
  }
}
```

## Response (200 (Repeated externalref) Original transfer)
The externalref was already used on this wallet. Nothing new is sent: the reply is the ORIGINAL transfer, with its status in data.txstatus. PY04 (status 1) when it is pending (0) or paid (1): record it, do not resend. PY05 (status 0, HTTP 409 in strict mode) with txstatus 2 when it failed: send it again with a new externalref. PY05 with data "extid" when another kind of transaction used it.

```json
{
  "status": "1",
  "code": "PY04",
  "message": [
    "Duplicate extid, this is the original pay out",
    "Click close to view transactions."
  ],
  "data": {
    "txstatus": 1,
    "receiver": "0240000007",
    "transactionid": "32759150",
    "externalref": "28171451",
    "thirdpartyref": "901733241086",
    "receivername": "",
    "amount": "1.00",
    "amountfee": "1.01",
    "networkfee": "0.00",
    "fee": "0.01"
  },
  "go": null,
  "meta": {
    "requestid": "req_c68f4c66115c26725c796242",
    "notices": []
  }
}
```


## Fields every response can carry

These fields are additive: existing fields keep their names, order and types.

| Field | Meaning |
| :--- | :--- |
| meta | Always present, last in the object. meta.replayed is true only when the response is the stored answer to a repeated Idempotency-Key (absent otherwise). meta.requestid is the unique id of the request (also the X-Request-Id response header): quote it when you contact support. meta.notices is always an array, empty when there is nothing to report; each notice is { code, message, docs? }, for example that a deprecated way of sending credentials was used. See [Deprecations](https://docs.moolre.com/guides/deprecations). |

There is no outcome field. Decide the result from status, code and, on payment and transfer endpoints, data.txstatus (0 pending, 1 succeeded, 2 failed). These codes mean the result is unknown and may still succeed, so treat them as pending and check the status: PY01, PY02, TR01, TR02, TP11, TP18, APY10, APY16, ASL06, IS30, SYS500. Status 1 with TR08, OBGH01, OTGH01, OBNG01, GHQ03 or OM03 is final success; any other status 1 is an accepted, unfinished request.

Send X-Moolre-Http-Status: strict to receive real HTTP status codes (400, 401, 403, 404, 409, 422, 429, 5xx) instead of HTTP 200. See [Responses and request IDs](https://docs.moolre.com/guides/responses).

Back to the Moolre AI documentation index