Skip to main content
POST
Apply for an account

Authorizations

Authorization
string
header
required

Authorization: Bearer <key>. Sandbox keys start with mgw_test_ and live keys start with mgw_live_. Each key works only in its own environment, and a live key works only from the IP addresses or ranges registered for it.

Scopes

apply

Headers

Idempotency-Key
string
required

A key you choose to identify this request. Send the same key every time you retry the request. Once used, a key stays tied to that request permanently. It must be printable ASCII with no spaces, and we compare it byte for byte. Send the header only once.

Required string length: 1 - 255
Pattern: ^[!-~]+$

Body

application/json

Your customer's details, for us to check and open their account.

We check that every required field is there; that each field is at most 200 characters, trimmed at both ends, with no control or invisible characters; that each name (first_name, middle_name, last_name, mothers_maiden_name, next_of_kin_name and bank_account_name) is Latin letters, with or without accents, and a single space, a hyphen, an apostrophe or a full stop between words, within its own maxLength; that dates are real dates on or after 1900-01-01 and not in the future; that the customer is 18 or older today in West Africa Time (WAT); that gender is M or F; that bvn and nin are 11 digits; that bank_account_number is 10 digits; that email is an address, as a browser's email field takes one, with a dot in its domain, and at most 40 characters; that state, state_of_origin, lga_of_origin and bank are shaped like the codes in the reference lists; and that bank isn't a bank whose licence the CBN revoked. Before the depository is asked, a state, state_of_origin or lga_of_origin the broker's lists don't hold ends the application rejected, with reject_reason invalid_field and param naming it, and a bank the depository doesn't take ends it rejected, with reject_reason declined_by_depository and param bank. The broker checks everything else when we add the account to it, after the depository has opened it: a field it can't accept ends the application rejected, with reject_reason rejected_by_broker. We reject unknown fields and any field that appears twice, even with different letter case.

first_name
string
required

The customer's first name, written as a name: Latin letters, with or without accents, and a single space, a hyphen, an apostrophe or a full stop between words.

Required string length: 1 - 50
last_name
string
required

The customer's last name, written as first_name is.

Required string length: 1 - 50
gender
enum<string>
required

M or F.

Available options:
M,
F
date_of_birth
string<date>
required

Must be on or after 1900-01-01, and the customer must be 18 or older today in West Africa Time (WAT): we refuse a minor with 400 invalid_request, param set to date_of_birth.

email
string
required

The customer's email address, as a browser's email field takes one: one @, no spaces, at most 64 characters before the @, and a dot in the domain. At most 40 characters, the most the depository (CSCS) takes: a longer one is refused with 400 invalid_request, param set to email. In the sandbox, use a new value for each application: the sandbox's broker refuses one it has already accepted, from any partner.

Required string length: 1 - 40
phone
string
required

The customer's phone number: a Nigerian number, 0 and 10 digits, or +234 and the same 10 digits. We send it to the broker as 0 and 10 digits, which the broker asks for.

Required string length: 1 - 200
Pattern: ^(\+234|0)[0-9]{10}$
mothers_maiden_name
string
required

The customer's mother's maiden name, written as first_name is. The broker's document marks it optional, but the broker refuses an application without one, so we require it.

Required string length: 1 - 50
street
string
required

The street of the customer's home address.

Required string length: 1 - 200
city
string
required

The city of the customer's home address.

Required string length: 1 - 200
state
string
required

A code from GET /v1/reference/states.

Pattern: ^[A-Za-z0-9-]{1,32}$
postcode
string
required

The postcode of the customer's home address.

Required string length: 1 - 200
state_of_origin
string
required

A code from GET /v1/reference/states.

Pattern: ^[A-Za-z0-9-]{1,32}$
lga_of_origin
string
required

A code from GET /v1/reference/states/{state}/lgas.

Pattern: ^[A-Za-z0-9-]{1,32}$
next_of_kin_name
string
required

The name of the customer's next of kin, written as first_name is.

Required string length: 1 - 100
next_of_kin_phone
string
required

The phone number of the customer's next of kin, written as phone is.

Required string length: 1 - 200
Pattern: ^(\+234|0)[0-9]{10}$
bank
string
required

A code from GET /v1/reference/banks. A bank whose licence the CBN revoked, such as Heritage Bank, is refused with 400 invalid_request: its accounts are closed.

Pattern: ^[A-Za-z0-9-]{1,32}$
bank_account_name
string
required

The name on the customer's bank account at bank, written as first_name is. We don't compare it: we check the bank's own name for the account.

Required string length: 1 - 100
bank_account_number
string
required

The customer's account number at bank: their NUBAN, 10 digits. We check that the bank holds it in the customer's own name.

Pattern: ^[0-9]{10}$
bank_account_opened
string<date>
required

Can't be before date_of_birth or after today in West Africa Time (WAT).

bvn
string
required

The customer's Bank Verification Number: 11 digits. We check it at the identity registry: the first and last names and the date of birth must match its record. In the sandbox, use one of the test identities.

Pattern: ^[0-9]{11}$
middle_name
string

The customer's middle name, or names, if they have one, written as first_name is. Our identity checks don't compare it.

Maximum string length: 100
next_of_kin_relationship
string

How the next of kin is related to the customer.

Maximum string length: 200
next_of_kin_address
string

The address of the customer's next of kin.

Maximum string length: 200
nin
string

The customer's National Identification Number: 11 digits. When you send it, we check it as we check bvn.

Pattern: ^[0-9]{11}$
tax_id
string

The customer's tax identification number.

Maximum string length: 200
chn
string

The customer's existing CHN (Clearing House Number), from any broker, if they have one. We open the account under it, so the customer keeps one CHN. Letters and digits, 6 to 20 of them: we remove spaces and read letters as upper case. We take it only where we've enabled it for your company. Otherwise, and for a CHN of any other form, we refuse the application with 400 invalid_request, param set to chn.

Maximum string length: 200
client_reference
string

Your own reference for this, such as your internal ID, so you can find it again. 1 to 64 printable ASCII characters, with no spaces, matched exactly. We store it and return it. It's part of the request an Idempotency-Key stands for, so a retry with a different client_reference returns 409. Never put personal data in it: no names, phone numbers, email addresses, BVN, NIN or account numbers of your customers.

Required string length: 1 - 64
Pattern: ^[!-~]{1,64}$
Example:

"ord-88213"

Response

This idempotency key was already used for this same application, so we didn't send anything new. state is the application's state now. It reads sending while the first request is in progress, or after it if its outcome was not recorded.

An application to open a brokerage account for your customer.

object
string
required
Allowed value: "application"
id
string
required

Unique identifier for the application. Starts with app_.

Pattern: ^app_[a-z2-7]{20}$
state
enum<string>
required

sending: being stored, while your request is in progress. If it still reads sending after its request has ended, its outcome was not recorded, and our operations team reconciles it. documents_required: we have it, and need the customer's four documents. submitted: we have its four documents, and are checking the customer's identity and opening the account. opened: account is the new account, and you can trade for it. uncertain: we couldn't read an answer from a registry, the depository or the broker, or couldn't confirm a step, or we hadn't asked the depository to open the account within 7 days of when you sent it, or another answer needs a person; reason says which. Our operations team settles it: it becomes submitted again, and opens or ends as any other application does, or it ends unplaced. One that becomes uncertain before we've asked the depository can only end unplaced. rejected: see reject_reason and param. refused: we couldn't take it, and sent nothing. unplaced: our operations team found that no account was opened for it. You can send it again under a new key. New values can be added: handle an unrecognised value with a safe default.

Available options:
sending,
documents_required,
submitted,
opened,
uncertain,
rejected,
refused,
unplaced
reference
string | null
required

Our reference for the account at the broker, once we've added the account to the broker. null until then.

account
string | null
required

The account code, once the account is opened.

reason
string | null
required

A sentence explaining the application's current state. It's for people to read, so don't use it in your logic.

reject_reason
enum<string> | null
required

Why the application was rejected. Set only when state is rejected. New values can be added: handle an unrecognised value with a safe default.

Available options:
invalid_field,
already_at_broker,
rejected_by_broker,
declined_by_broker,
identity_mismatch,
bank_account_mismatch,
identity_unverified,
declined_by_depository,
null
param
string | null
required

The field that caused the rejection, when the rejection names one. Never includes the field's value.

created_at
string<date-time>
required

When we recorded the application.

updated_at
string<date-time>
required

When the application last changed state.

client_reference
string | null
required

Your own reference, as you sent it. Null if you didn't send one.