How OTP works
we describe how OTP works in BM
If you want to use this feature you work with our v2 APIs

You have 3 steps for using OTP while P2P
First step
API for info v2
GET
/api/agent/p2p/info/v2
You request like
In this step you send request to p2p/info/v2 for getting info. And also by this request we save OTP settings. They are agentTranId, amount and bank card. And we save these in ForeignPay table in database with status CREATED.
Second Step
Sending OTP request
GET
/api/agent/p2p/send-otp
Headers
locale
String
Language key for sending sms content
Request Body
agentTanId*
String
phoneNumber*
String
In this step we send sms to client. By sending request to p2p/send-otp you can send sms to client.
And you send request with params agentTranId and phoneNumber. By agentTranId we find ForeignPay previously saved while info v2 and we get ForeignPay and with this ForeignPay we send sms to phoneNumber.
Third step
Api for P2p Pay v2
GET
/api/agent/p2p/pay/v2
You have to set otp param for request p2p/pay/v2 .** And** we verify your sent otp with otp sent by sms if verified we pay or else we send failure response
Remember that
In p2p/info/v2, send-otp and p2p/pay/v2 APIs requests you have to give same agentTrId.
Response's statuses code like this
31
OTP_VERIFIED
30
OTP_SENT
-30
OTP_NOT_VERIFIED
-32
OTP_NOT_FOUND
-33
OTP_EXPIRED
-35
OTP_NO_LIMIT
-36
OTP_INVALID_CODE
Last updated