B2C Registration Flow
A comprehensive guide to the individual customer registration process in the FinHub platform
B2C Customer Registration Flow
This guide details the complete flow for registering individual (B2C) customers in the FinHub platform. The registration process involves several steps including account creation, email verification, phone verification, and more.
Flow Overview
The following sequence diagram illustrates the complete B2C registration process:
Detailed API Flow
Step 1: Create Customer Account
The first step is to create a customer account with basic information.
API Request:
Request Body:
Response:
Implementation Notes:
- The customer ID is stored in localStorage
- The initial status is set to PENDING_VERIFICATION
- The system creates a basic customer profile that will need verification
Step 2: Email Verification
After creating the account, the system sends a verification code to the customer’s email.
API Request:
Request Body:
Response:
Implementation Notes:
- The verification code is typically a 6-digit number
- The code is valid for a limited time (usually 10 minutes)
- The email contains instructions for entering the code
Step 3: Verify Email Code
The customer receives the verification code via email and submits it to verify their email address.
API Request:
Request Body:
Response:
Implementation Notes:
- If the code is incorrect, the system returns an error
- The customer can request a new code if needed
- After successful verification, the system updates the customer’s verification status
Step 4: Phone Number Verification
After email verification, the system sends a verification code to the customer’s phone number.
API Request:
Request Body:
Response:
Implementation Notes:
- The SMS verification code is typically a 6-digit number
- The code is valid for a limited time (usually 10 minutes)
- International phone number format is required
Step 5: Verify SMS Code
The customer receives the verification code via SMS and submits it to verify their phone number.
API Request:
Request Body:
Response:
Implementation Notes:
- If the code is incorrect, the system returns an error
- The customer can request a new code if needed
- After successful verification, the system updates the customer’s verification status
- The customer’s account is now ready for KYC verification
Error Handling
The registration process includes comprehensive error handling for various scenarios:
Error Scenario | Error Code | Description |
---|---|---|
Invalid email format | INVALID_EMAIL | The provided email does not match required format |
Duplicate email | EMAIL_ALREADY_EXISTS | An account with this email already exists |
Weak password | WEAK_PASSWORD | Password does not meet security requirements |
Invalid verification code | INVALID_CODE | The provided verification code is incorrect |
Expired verification code | CODE_EXPIRED | The verification code has expired |
Too many attempts | TOO_MANY_ATTEMPTS | Too many failed verification attempts |
Invalid phone number | INVALID_PHONE | The provided phone number is invalid |
Next Steps
After completing the registration process, the customer should proceed with:
Implementation Considerations
When implementing the B2C registration flow, consider the following:
- Security: Implement proper password hashing and secure communication
- Rate Limiting: Apply rate limiting to prevent abuse of verification endpoints
- User Experience: Provide clear error messages and instructions
- Compliance: Ensure the registration process complies with relevant regulations
- Accessibility: Make the registration process accessible to all users