UserAuth
Description
Perform a login process with a 2-factor auth handling. All merchant can LogIn except co 139.
Request
Url - {baseUrl}/API/v7/
These parameters will be sent in the request body. (POST method)
Parameter | Data Type | Description | Â |
---|---|---|---|
userName | Text | - | Mandatory |
userPassword | Text | - | Mandatory |
userPin | Number | The 2 FA Value. | Optional |
| Text | Â | Mandatory |
The Flow
After receiving the parameters, the userName will be used to check if this user has 2FA enabled. if so, and the userPin parameter is missing an error will respond back to the user - “Missing 2FA value“.
Then the user will send again his credentials with the userPin (the 2FA value). The user’s credentials and pin code will be verified to approve a successful login.
If the user does not has 2FA option enabled, the login process continues to verify the userPassword.
Request (XML)
<?xml version="1.0" encoding="utf-8"?>
<API3G>
<Request>UserAuth</Request>
<userName>{userName}</userName>
<userPassword>{userPassword}</userPassword>
<companyCode>{companyCode}</companyCode>
<userPin>{userPin}</userPin>
</API3G>
Response (XML)
Success
<?xml version="1.0" encoding="UTF-8"?>
<API3G>
<Code>000</Code>
<Explanation>Results Found</Explanation>
    <UserToken>{UserToken}</UserToken>
<CompanyName>{CompanyName}</CompanyName>
<CompanyBrandName>{CompanyBrandName}</CompanyBrandName>
<CompanyCode>{CompanyCode}</CompanyCode>
<CompanyToken>{CompanyToken}</CompanyToken>
<Currencies>
<Currency>EUR</Currency>
<Currency>GHS</Currency>
<Currency>KES</Currency>
</Currencies>
</API3G>
Error
<?xml version="1.0" encoding="UTF-8"?>
<API3G>
<Code>999</Code>
    <Explanation>Missing 2FA value</Explanation>
</API3G>
Â