User Verification on First Booking with Promo Code
Description / Background
Implementing a User Verification on the first booking with a promo code to prevent the user from creating new accounts (fake accounts) and getting the benefit from promo code.
This feature will be implemented on Checkout new UI.
Glossary
User = Registered user
Objectives
- User will receive OTP when they book for the first time and using offers (referral code, voucher code, campaign, etc.).
- User will not receive OTP when they didn't use offers or gift cards.
- User can't book if they are not submit the OTP code
- User who do not use a Thai number will not be able to see the offers and giftcard section.
- Old User will receive the OTP when they book using offers for the first time since this feature released
- Guest user didn't receive the OTP
- The first time the user clicks Resend, the time limit is 1 minute; the next time the user clicks Resend, the time limit is 3 minutes.
Scope
Checkout page for first booking using offers.
Location
checkout page
Sequence Diagram / Flow
ERD
Backend Implementation
Request Verification Code
{{ base_api }}/request_verification_code.json https://hh-engineering.my.id/api/v5/request_verification_code.json?testing=true Payload:
{
"phone": "+66897877887",
"access_token":"B3G4mBjPHfxsINS0F6lhh-i_8XkiYZzFYiD1sr1t89E"
}
Response:
{
"success": true,
"message": "The verification code request has been processed.",
"data": {
"verified": false,
"otp": 812979,
"phone": "+66897877887",
"time": "2024-05-28T13:00:49+07:00",
"reff": "HVMLVI"
}
}
Verify Phone Number
{{ base_api }}/verify_verification_code.json https://hh-engineering.my.id/api/v5/verify_verification_code.json Payload:
{
"phone": "+66897877887",
"access_token":"B3G4mBjPHfxsINS0F6lhh-i_8XkiYZzFYiD1sr1t89E",
"verification_code": "812979"
}
Response:
{
"data": null,
"message": "Your number has been successfully verified.",
"success": true
}
Frontend Implementation
PRD & Task
Private (https://app.clickup.com/9003122396/docs/8ca1fpw-7922/8ca1fpw-35216)
[
hungryhubgroup.slack.com
https://hungryhubgroup.slack.com/archives/C01C1U5LBFT/p1717477551416639
](https://hungryhubgroup.slack.com/archives/C01C1U5LBFT/p1717477551416639)
Private (https://app.clickup.com/t/86cuyfnv5)
Design







