Afriex SDK
API Reference

SME Registration API

Register your business as its own SME in Kenya, so that dedicated KES virtual accounts are issued under your legal entity.

You need this only to collect KES through dedicated virtual accounts. No other corridor requires it.

The registration has three steps, called in order.

1. Initiate

const registration = await afriex.smeRegistration.initiate({
  mobile: "+254712345678",
  email: "admin@company.co.ke",
  businessType: 2,
});

console.log(registration.onboardingRequestId, registration.expiresAt);

A one-time passcode is sent to mobile. businessType must be 2: only Limited Liability Companies are supported.

2. Confirm the Passcode

const registration = await afriex.smeRegistration.confirmOtp({
  onboardingRequestId: "onboarding-request-id",
  otp: "483921",
});

console.log(registration.status); // DETAILS_PENDING

3. Submit the Details

submit() takes the company details, directors, and optionally organizationShareholders and media. At least one director is required.

The API reference does not list the company detail fields, so submit() sends the object you pass as it is. Upload every document with media.upload() first, and pass the returned key in the field that asks for the file.

Get the Status

const registration = await afriex.smeRegistration.getStatus();

console.log(registration.status, registration.reviewStatus);
FieldTypeDescription
onboardingRequestIdstring | nullnull when the business has never registered
statusstring | nullHow far the steps have got
reviewStatusstringThe review outcome. Present once the registration is submitted
rejectReasonsstring[] | nullWhy the registration was rejected
isReviewStatusStalebooleantrue when reviewStatus is the last known outcome, not a fresh one

Status Values

statusMeaning
OTP_PENDINGinitiate() was called. Confirm the passcode
DETAILS_PENDINGThe passcode was confirmed. Submit the details
SUBMITTEDThe details were submitted
REJECTEDThe registration was rejected
EXPIREDA step was not completed before expiresAt

reviewStatus is one of SUBMITTED, PROCESSING, UNDER_REVIEW, APPROVED, REJECTED, CLOSED or UNKNOWN. Dedicated KES virtual accounts are issued only once it is APPROVED. Treat UNKNOWN as still in review.

Mobile Numbers

Every mobile number, the applicant's and each director's, must be Kenyan. These forms are accepted:

FormatExample
E.164 with ++254712345678
International without +254712345678
National with leading zero0712345678
National without leading zero712345678

A number from another country is rejected with 422.

Key Permissions

The three steps need the COMPLIANCE.KYB.SUBMIT permission, and getStatus() needs COMPLIANCE.KYB.READ.

On this page