Change PIN Flow
📋 Overview​
Complete workflow for changing a user's existing login PIN. The user must first verify their current PIN, then enter and confirm a new PIN.
🔄 Workflow Steps​
Step 1: Current PIN Verification​
- User enters their existing login PIN
- System calls the Verify PIN API to validate the current PIN
- If verification is successful and returns a token, PIN verification is complete
- If verification fails, show error message and ask user to retry
Step 2: New PIN Input​
- After successful current PIN verification, user enters new PIN
- User confirms the new PIN by entering it again
- Frontend validates that both PINs match
Step 3: Change PIN API Call​
- Once new PIN is confirmed, system calls the Change PIN API
- Include the new PIN in the request body
📡 API References​
Step 1: Verify Current PIN​
- API: Verify Login PIN API
- Purpose: Validate the user's current PIN before allowing changes
- Returns: Authentication token on successful verification
Step 2: Change PIN​
- API: Change Login PIN API
- Purpose: Update the user's PIN to a new value
Note: For complete API details, request/response formats, and error codes, please refer to the individual API documentation pages linked above.
🔄 Flow Logic​
- User enters current PIN → Call Verify PIN API
- If verification succeeds → Proceed to new PIN input
- If verification fails → Show error, return to current PIN input
- User enters new PIN → Validate format and confirmation
- Call Change PIN API → Use token from verification step
- If change succeeds → Show success message
- If change fails → Show error message
This workflow ensures secure PIN changes by requiring current PIN verification before allowing any modifications.