ID card verification » History » Version 2
prin methirattanasophon, 02/23/2026 02:42 AM
| 1 | 1 | prin methirattanasophon | # ID card verification |
|---|---|---|---|
| 2 | 2 | prin methirattanasophon | |
| 3 | 1. User Interface |
||
| 4 | |||
| 5 | Description: User interface for ID card verification with form validation. |
||
| 6 | |||
| 7 | Page Route: /onboarding/idcard |
||
| 8 | |||
| 9 | Data Source: |
||
| 10 | - localStorage -> member id |
||
| 11 | - fetch from API -> prefill data |
||
| 12 | |||
| 13 | Fields Input |
||
| 14 | |||
| 15 | |field|type||mandatory| |
||
| 16 | |:--|:--|:--|:--| |
||
| 17 | |National ID Card Number|int|13 digits of number. last digit is calculate by Thai citizen ID formula|Y| |
||
| 18 | |Date of Birth|Date|select from calendar|Y| |
||
| 19 | |Laser Code|string|12 characters. 2 english alphabats follow by 10 digits number|Y| |
||
| 20 | |Expiration Date|Date|select from calendar. the expiration date must be at least 7 days from the present|Y| |
||
| 21 | |Martial Status|string|select from value "single"\|"married"\|"divorced"|Y| |
||
| 22 | |||
| 23 | Workflow: |
||
| 24 | <img style="width: 283px;" src="clipboard-202602191007-af7u9.png"><br> |
||
| 25 | |||
| 26 | --- |
||
| 27 | |||
| 28 | 2. System Integration |
||
| 29 | |||
| 30 | 2.1 Prefill user data |
||
| 31 | |||
| 32 | Objective: To retrieve user latest submit form data |
||
| 33 | |||
| 34 | API: |
||
| 35 | |||
| 36 | - Endpoint: /customer/pre-idcard |
||
| 37 | - Mehthod: GET |
||
| 38 | - Data: Query params |
||
| 39 | |||
| 40 | ``` |
||
| 41 | ...?reference_id=${member_id} |
||
| 42 | ``` |
||
| 43 | Response: |
||
| 44 | |Key|Value| |
||
| 45 | |:--|:--| |
||
| 46 | |reference_id|string| |
||
| 47 | |member_id|string| |
||
| 48 | |date_of_birth|string| |
||
| 49 | |id_card|string| |
||
| 50 | |expire_date|string| |
||
| 51 | |||
| 52 | --- |
||
| 53 | |||
| 54 | 2.2 Form Submission |
||
| 55 | |||
| 56 | Objective: To save user data |
||
| 57 | |||
| 58 | API: |
||
| 59 | |||
| 60 | - Endpoint: /customer/idcard |
||
| 61 | - Mehthod: POST |
||
| 62 | |||
| 63 | Request Body: |
||
| 64 | |Key|Type|Value| |
||
| 65 | |:--|:--|:--| |
||
| 66 | |member_id|string|uuid| |
||
| 67 | |date_of_birth|string|date string| |
||
| 68 | |status|int|1-single, 2-married, 3-devoiced| |
||
| 69 | |id_card|string|| |
||
| 70 | |laser_code|string|| |
||
| 71 | |expire_date|string|date string| |
||
| 72 | |step|int|page index| |
||
| 73 | |||
| 74 | Response: |
||
| 75 | |Key|Type|Value| |
||
| 76 | |:--|:--|:--| |
||
| 77 | |reference_id|string|uuid| |
||
| 78 | |member_id|string|uuid| |
||
| 79 | |date_of_birth|string|date string| |
||
| 80 | |id_card|string| |
||
| 81 | |expire_date|string|date string| |
||
| 82 | |||
| 83 | --- |