Get User Profile
Headers
Bearer token for authentication
Response
Indicates if the request was successful
User profile information
Update Profile Picture
Headers
Bearer token for authentication
Must be
multipart/form-dataBody Parameters
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
Success message
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
Bearer token for authentication
Must be
application/jsonBody Parameters
New full name for the user
Response
Indicates if the update was successful
Error Responses
Initialize Email Verification Payment
Headers
Bearer token for authentication
Response
Razorpay order ID
Payment amount in paise (9900 = ₹99)
Currency code (INR)
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
Bearer token for authentication
Must be
application/jsonBody Parameters
Payment ID from Razorpay checkout
Order ID from the init endpoint
HMAC signature from Razorpay for verification
Response
Indicates if verification was successful
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