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 PROPERTYDESCRIPTION
phoneNumberUser phone number, Can't be empty
emailUser email
firstNameUser first name
lastNameUser last name
passwordUser password, Can't be empty
addressUser address
otpUser 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 PROPERTYDESCRIPTION
userIdOPay userId
phoneNumberPhone number masked
emailEmail masked
firstNameFirstName masked
lastNameLastName masked
addressAddress 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 PROPTERYDESCRIPTION
phoneNumberUser phone number, Can't be empty

Sample Response

post/info/user/sendOTP
{
  "phoneNumber": "+2349876543210",
  "status": "OTP_SENT"
}
RESPONSE PROPTERYDESCRIPTION
phoneNumberphone number masked
statusOTP_SENT
  • Community

  • Official Website
  • Facebook
  • Linkedln
  • Twitter
Was this page helpful?
Yes
No

Help us make this page better

Please leave a comment on how we can improve your experience.