Get User Profile
Headers
string
required
Bearer token for authentication
Response
string
Indicates if the request was successful
object
User profile information
Update Profile Picture
Headers
string
required
Bearer token for authentication
string
required
Must be
multipart/form-dataBody Parameters
file
required
Image file for the profile picture. Uploaded using multer with diskStorage configuration. Files are temporarily stored in the
uploads/ directory with a unique filename format: profilePic-{timestamp}-{random}.{ext}Response
string
Success message
string
Public URL of the uploaded profile picture
Implementation Details
- Multer storage configuration uses
diskStoragewith unique filename generation - Old profile picture is deleted from Devload storage before uploading new one
- File is uploaded to Devload CDN and public URL is stored in database
- Local temporary file is automatically cleaned up after upload
- Updates both
profilePic(URL) andprofilefileid(storage reference) fields
Error Responses
Update Full Name
Headers
string
required
Bearer token for authentication
string
required
Must be
application/jsonBody Parameters
string
required
New full name for the user
Response
boolean
Indicates if the update was successful
Error Responses
Initialize Email Verification Payment
Headers
string
required
Bearer token for authentication
Response
string
Razorpay order ID
number
Payment amount in paise (9900 = ₹99)
string
Currency code (INR)
string
Order receipt ID
Implementation Details
- Creates a Razorpay order with amount ₹99 (9900 paise)
- Customer details (email, name) are automatically included
- Creates a
VerifyuserPaymentrecord with statuspending - Order ID is stored for verification
Error Responses
Verify Email Verification Payment
Headers
string
required
Bearer token for authentication
string
required
Must be
application/jsonBody Parameters
string
required
Payment ID from Razorpay checkout
string
required
Order ID from the init endpoint
string
required
HMAC signature from Razorpay for verification
Response
boolean
Indicates if verification was successful
boolean
Indicates if the user is now verified
Implementation Details
- Verifies payment signature using HMAC-SHA256
- Checks if order exists and matches user
- Prevents duplicate verification (checks if status is already
completed) - Updates user’s
verifiedfield totrue - Sets
verifiedAttimestamp - Updates order status to
completed