OPay User Account Creation
This endpoint allows you register a new user when they don’t have an existing account.
Create User
Description
Register OPay user.
HTTP Method
POST
Sandbox
http://sandbox-cashierapi.opayweb.com/api/v3
Production
https://cashierapi.opayweb.com/api/v3
API Endpoint
/info/user/create
Sample Request
post/info/user/create
curl -X POST --header 'Authorization: Bearer public_key' --header 'MerchantId:
256619092316009' --header 'content-type: application/json'
https://cashierapi.opayweb.com/api/v3/info/user/create
Sample Request Body
post/info/user/create
{
"phoneNumber": "+2349876543210",
"email": "Jerry@gmail.com",
"firstName": "Jerry",
"lastName": "Li",
"password": "123456",
"address": "No 1. Star Garden, Lagos",
"otp": "365789"
}
RESPONSE PROPERTY | DESCRIPTION |
---|---|
phoneNumber | User phone number, Can't be empty |
User email | |
firstName | User first name |
lastName | User last name |
password | User password, Can't be empty |
address | User address |
otp | User phone's otp |
Sample Response
post/info/user/create
{
"userId": "156619112022589929",
"phoneNumber": "+2349876543210",
"email": "Jerry@gmail.com",
"firstName": "Jer**",
"lastName": "Li",
"address": "No 1. Star Garden, Lagos"
}
RESPONSE PROPERTY | DESCRIPTION |
---|---|
userId | OPay userId |
phoneNumber | Phone number masked |
Email masked | |
firstName | FirstName masked |
lastName | LastName masked |
address | Address masked |
Send OTP
Description
To validate a user's account during account registration, this endpoint allows you to generate and send an OTP to the registered number for them to use.
HTTP Method
POST
Sandbox
http://sandbox-cashierapi.opayweb.com/api/v3
Production
https://cashierapi.opayweb.com/api/v3
API Endpoint
/info/user/sendOTP
Authorization | String | Set value to Bearer Signature Which is essentially a HMAC SHA512 signature of the whole payload (in alphabetical order) signed using your Secret Key. To get your secret key login to your OPay Dashboard, click on the Settings tab, and then click on API Keys & Webhooks. |
Content-Type | String | Set value to application/json |
MerchantID | String | Set value as merchantID OPay merchant ID is a unique 15-digit number assigned to all OPay merchants. To get your merchantID, login to your OPay Dashboard, click on the Settings tab and you will find it in the Business section. |
Sample Request
post/info/user/sendOTP
curl -X POST --header 'Authorization: Bearer Signature' --header 'MerchantId:
256619092316009' --header 'content-type: application/json'
https://cashierapi.opayweb.com/api/v3/info/user/sendOTP
Sample Request Body
post/info/user/sendOTP
{
"phoneNumber": "+2349876543210"
}
RESPONSE PROPTERY | DESCRIPTION |
---|---|
phoneNumber | User phone number, Can't be empty |
Sample Response
post/info/user/sendOTP
{
"phoneNumber": "+2349876543210",
"status": "OTP_SENT"
}
RESPONSE PROPTERY | DESCRIPTION |
---|---|
phoneNumber | phone number masked |
status | OTP_SENT |