OPAY Authentication API
Merchant Registration
OPAY has a dedicates web portal where merchant registration can be done very easily. That same web portal is a full-featured web interface which allows OPAY users to monitor their payments, it gives also other details such as the number of people who are paying using OPAY and statistics about periodical payments.
For developers who would like to achieve the same process directly in their application, the following API will help them to create merchant account, and receive authentication credentials on the specified email and telephone.
POST https://opay-api.oltranz.com/opay/register
Sample object
POST /opay/register HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Content-Length: 208
{
"businessName" : "Business Name",
"firstName" : "First Name",
"lastName" : "Last Name",
"telephoneNumber" : "250780000000",
"email" : "joedoe@gmail.com",
"address" : "Address",
"tin" : "TIN"
}
Request object parameters
Parameter |
Type |
Optional |
Description |
---|---|---|---|
businessName |
string |
false |
merchant business name |
firstName |
string |
false |
business person first name |
lastName |
string |
false |
business person last name |
telephoneNumber |
string |
false |
business person telephone number |
string |
true |
business person email |
|
address |
string |
true |
physical address of business |
tin |
string |
true |
business TIN number |
Response object
{
"code": "200",
"description": "MERCHANT CREATED SUCCESSFULLY. NO NEW CREDENTIALS CREATED AS THE USER ALREADY EXISTED IN THE SYSTEM",
"body": {
"contactTelephoneNumber": "joedoe@gmail.com",
"merchantId": "4028810b67c1af1a0167c2073da60001",
"contactEmail": "250700000000",
"contactName": "First & Last Name",
"businessName": "Business Name",
"shortCode": "84637"
}
}
Response object parameters description
Parameter |
Type |
Optional |
Description |
---|---|---|---|
code |
string |
false |
200: SUCCESS and 401 : FAILED |
description |
string |
false |
Description of the merchant registration request |
body |
string |
true |
Return object body. If the code value is set to 401, the returned object will be null (empty) |
body.contactTelephoneNumber |
string |
true |
Contact Person Telephone Number |
body.merchantId |
string |
true |
Merchant Id generated by OPAY. To be used for ulterior payment requests |
body.contactEmail |
string |
true |
Contact Person Email address |
body.contactName |
string |
true |
Contact Person Name |
body.businessName |
string |
true |
Business Name |
body.shortCode |
string |
true |
Short code to be used for Payer Initiated payment requests |
Login
Once the account is created, the user receives credentials to be used to get authenticated on OPAY.
Note
Credentials
Credentials can be either email (username) and password or telephone (username) and PIN.
POST https://opay-api.oltranz.com/opay/login
Sample object
POST /opay/register HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Content-Length: 115
{
"applicationId" : "aac88109eabc84d4fb000000000",
"username" : "joedoe@gmail.com",
"password" : "Password"
}
Request object parameter desription
Parameter |
Type |
Optional |
Description |
---|---|---|---|
username |
string |
false |
Email OR Telephone Number |
password |
string |
false |
Password OR PIN |
applicationId |
string |
true |
OPAY Application ID |
Note
JWT authentication
Both access_token
and refresh_token
given on successful login (authentication) are known as JWT tokens. While the normally used session (especially in web management) seem to be technology dependent, JWT are technology and platform agnostic. For further details about JWT please refer to jwt.io and wikipedia.