User Registration
Users need to be registered before creating any transactions. Otherwise, the transactions so created will automatically fail.
Check the registration status of the user#
This API end-point can be used to see if the user is registered for the UPI Credit service.
API Definition#
- Request
- Response
GET https://sdk.bharatx.tech/service/payments/merchant/user/registration/status?userPhoneNumber=%2B9999999999
Headers:Authorization: Basic abcde=
Headers:Content-Type: application/json
Body:{ "registrationStatus": "string", "nextStep": "string"}registrationStatus:- "registered": The user is registered and can use the service
- "unregistered": The user is unregistered and the registration needs to proceed as described in nextStep
nextStep:- "otp": The merchant needs to request an OTP for the user
Request an OTP#
If the previous API returned otp for nextStep field, then the merchant can call this API to trigger an OTP for the user.
API Definition#
- Request
- Response
POST https://sdk.bharatx.tech/service/payments/merchant/user/registration/otp/request
Headers:Authorization: Basic abcde=Content-Type: application/json
Body:{ "userPhoneNumber":"+919999999999", "userFirstName":"string", "userLastName":"string"}
userPhoneNumberis requireduserFirstNameis requireduserLastNameis optional
Headers:Content-Type: application/json
Body:{ "otpToken":"abcde"}OTP Validation#
Once the user receives the OTP, user will pass it on to the merchant via the merchant app. The merchant can then call this API to validate the OTP received from the user and complete the registrtation process.
API Definition#
- Request
- Response
POST https://sdk.bharatx.tech/service/payments/merchant/user/registration/otp/verify
Headers:Authorization: Basic abcde=Content-Type: application/json
Body:{ "userPhoneNumber":"+919999999999", "otpToken":"abcde", "otpValue":"123456"}otpToken: This is the token received in the previous API.otpValue: The OTP value entered by the user. We supply 6-digit OTP codes as of now.
Headers:Content-Type: application/json
Body:{ "message":"ok"}