Create Account API

Environment: Sandbox

Create test business wallets/accounts in Sandbox only. Create Live wallets in the Moolre portal.

# Create Account API

Create a test business wallet/account in Sandbox only. For compliance reasons, create Live wallets in the Moolre portal: https://app.moolre.com/.

## Endpoint
- **Method**: POST
- **URL**: https://sandbox.moolre.com/open/account/create

## Headers
| Header | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| X-API-USER | string | Yes | Your Moolre username. |
| X-API-KEY | string | No | Optional in Sandbox. Omit placeholder keys. |

## Request Body
| Parameter | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| type | integer | Yes | Must be 1. |
| accountname | string | Yes | Registered name of the business. |
| currency | string | Yes | Currency code: GHS (Ghana Cedis). |
| api | boolean | No | Set to true to enable API transactions for the new account. |
| callback | string | Yes | Webhook URL for processing real-time transaction callbacks. |
| settlement | object | Yes | Required settlement object. Leave frequency, channel, recipient, and sublist empty when automatic settlement is not configured. |

## Response (200 Success)
Account created successfully.

```json
{
  "status": "1",
  "code": "WC02",
  "message": [
    "Wallet Created Successfully",
    "Your wallet will be reloaded shortly or Click close to refresh now."
  ],
  "data": {
    "status": 1,
    "accountnumber": "100000157291",
    "accountname": "My Business LTD",
    "paymentid": "0757291",
    "api": 0,
    "callback": "",
    "settlement": {},
    "secret": "cf2a797f-c8d8-470c-a736-6f5f78ae1d86"
  },
  "go": [
    "wallets",
    "1.57291"
  ],
  "meta": {
    "requestid": "req_c68f4c66115c26725c796242",
    "notices": []
  }
}
```


## Fields every response can carry

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

| Field | Meaning |
| :--- | :--- |
| error | On a failure: { code, message, fields: [{ field, code, message }] } listing every failing field. |
| 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, 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