{"openapi":"3.0.1","info":{"title":"OpenAPI definition","version":"v0"},"servers":[{"url":"http://api.payu.in","description":"Generated server url"}],"tags":[{"name":"ValidateToken","description":"Validate token"},{"name":"ResendOTP","description":"Resend OTP"},{"name":"ValidateOTP","description":"Validate OTP"},{"name":"SendOTP","description":"Send OTP"}],"paths":{"/token/validate":{"post":{"tags":["ValidateToken"],"summary":"Validate Token","description":"Validate token","operationId":"validateToken","parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"clientType","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenRequestDTO"}}},"required":true},"responses":{"200":{"description":"Token validated successfully","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Bad Request"}}}},"/otp/verify":{"post":{"tags":["ValidateOTP"],"summary":"Validate OTP","description":"Validate OTP","operationId":"verifyOTP","parameters":[{"name":"clientType","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyOtpRequestDTO"}}},"required":true},"responses":{"400":{"description":"Bad Request"},"200":{"description":"OTP validated successfully","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/otp/send":{"post":{"tags":["SendOTP"],"summary":"Send OTP","description":"Send OTP","operationId":"sendOTP","parameters":[{"name":"clientType","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendOtpRequestDTO"}}},"required":true},"responses":{"200":{"description":"Send OTP successfully","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Bad Request"}}}},"/otp/resend":{"post":{"tags":["ResendOTP"],"summary":"Resend OTP","description":"Resend OTP","operationId":"resendOTP","parameters":[{"name":"clientType","in":"header","required":true,"schema":{"type":"string"}},{"name":"uuid","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendOtpRequestDTO"}}},"required":true},"responses":{"400":{"description":"Bad Request"},"200":{"description":"Resend OTP successfully","content":{"application/json":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"RecipientDTO":{"type":"object","properties":{"email":{"pattern":"^$|[A-Za-z0-9+_.-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}$","type":"string","description":"Email to which OTP should be send","example":"test@example.com"},"mobileNumber":{"type":"string"}}},"SendOtpRequestDTO":{"required":["merchantDomain","merchantName","mobileNumber"],"type":"object","properties":{"mobileNumber":{"pattern":"^[6-9]\\d{9}$","type":"string","description":"Mobile Number in which OTP should be send","example":"9999999999"},"merchantName":{"pattern":"^[^!<>?*$#%{}]*$","type":"string","description":"Merchant Name is used in OTP Message","example":"amazon"},"merchantDomain":{"pattern":"^[^!<>?*$#%{}]*$","type":"string","description":"Merchant domain is used in OTP Message","example":"thefabulous.store"},"amount":{"type":"number","description":"Amount is used in OTP Message","format":"double","example":1000},"provider":{"type":"string","description":"Provider is flipkart Loyalty service","example":"flipkart"},"webfrontPrefix":{"type":"string","description":"Webfront Prefix for Omnichannel eligibility client","example":"shop"},"subClient":{"type":"string","description":"subClient is widget","example":"subClient"},"channel":{"type":"string","description":"subClient is widget","example":"SMS","enum":["SMS","EMAIL","WHATSAPP"]},"recipient":{"$ref":"#/components/schemas/RecipientDTO"},"userIdentifier":{"type":"string"},"merchantId":{"type":"string"}},"description":"Send otp request params to send otp if token validation fails"},"TokenRequestDTO":{"type":"object","properties":{"token":{"type":"string","description":"Token Value","example":"eyJhbGci.."},"mobileNumber":{"pattern":"^[6-9]\\d{9}$","type":"string","description":"Mobile Number should be same as used in token generation","example":"9999999999"},"email":{"pattern":"^$|[A-Za-z0-9+_.-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}$","type":"string","description":"Email to which OTP should be send","example":"test@example.com"},"sendOtpRequestDTO":{"$ref":"#/components/schemas/SendOtpRequestDTO"},"sendOtpOnFailureEnabled":{"type":"boolean","description":"Send otp when token validation fails"}}},"VerifyOtpRequestDTO":{"required":["otp","uuid"],"type":"object","properties":{"mobileNumber":{"pattern":"^[1-9]\\d{9}$","type":"string","description":"Mobile Number should be same as send OTP Request","example":"9999999999"},"email":{"pattern":"^$|[A-Za-z0-9+_.-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}$","type":"string","description":"Mobile Number should be same as send OTP Request","example":"9999999999"},"otp":{"type":"integer","description":"OTP received from send OTP Request","format":"int32","example":237613},"uuid":{"type":"string","description":"UUID received from send OTP Request","example":"21312122312323"}}}}}}