Thai » History » Version 1
prin methirattanasophon, 03/25/2026 05:50 AM
| 1 | 1 | prin methirattanasophon | # Thai |
|---|---|---|---|
| 2 | |||
| 3 | **1. Objective** |
||
| 4 | To enable users to update their personal information in order to maintain compliance with ongoing regulatory requirements. |
||
| 5 | |||
| 6 | --- |
||
| 7 | |||
| 8 | **2. Environment & Routing** |
||
| 9 | - Environment: UAT |
||
| 10 | - Page Route: https://uat.finansiaportal.com/authentication/re-kyc |
||
| 11 | --- |
||
| 12 | |||
| 13 | **3. Data Source** |
||
| 14 | User identification and authorization data are securely extracted from the Bearer Token. |
||
| 15 | |||
| 16 | Token (Decoded): |
||
| 17 | |key|type|description|value| |
||
| 18 | |--|--|--|--| |
||
| 19 | |CustomerType|int|Identifies the classification of the customer based on the system enumeration|1| |
||
| 20 | |||
| 21 | --- |
||
| 22 | |||
| 23 | **4.Customer Type Enumeration** |
||
| 24 | The CustomerType integer maps to the following defined constants: |
||
| 25 | ``` |
||
| 26 | const ( |
||
| 27 | CustomerTypeIndividual CustomerType = iota + 1 // Value: 1 |
||
| 28 | CustomerTypeForeigner // Value: 2 |
||
| 29 | CustomerTypeCorporate // Value: 3 |
||
| 30 | ) |
||
| 31 | ``` |
||
| 32 | --- |
||
| 33 | |||
| 34 | **5. API Specification** |
||
| 35 | This section defines the API endpoints used in the Re-KYC process. The process is divided into two main steps: Initialization and Submission. |
||
| 36 | |||
| 37 | ***5.1 Initialize Re-KYC Information (Init)***: |
||
| 38 | Used to retrieve or initialize the customer's current KYC information before they make updates. |
||
| 39 | - Method: POST |
||
| 40 | - Path: /api/v1/customer/info/rekyc/info |
||
| 41 | - payload: {} |
||
| 42 | |||
| 43 | Headers: |
||
| 44 | |key|value|description| |
||
| 45 | |--|--|--| |
||
| 46 | |Authorization|Bearer {token}|Access token extracted from the user's session.| |
||
| 47 | |||
| 48 | --- |
||
| 49 | |||
| 50 | ***5.2 Submit Re-KYC Information (Submit)***: |
||
| 51 | Used to submit the user's updated KYC information to the system. |
||
| 52 | - Method: POST |
||
| 53 | - Path: /api/v1/customer/info/rekyc/update |
||
| 54 | |||
| 55 | Headers: |
||
| 56 | |key|value|description| |
||
| 57 | |--|--|--| |
||
| 58 | |Authorization|Bearer {token}|Access token extracted from the user's session.| |
||
| 59 | |||
| 60 | Payload: |
||
| 61 | |key|type|description| |
||
| 62 | |--|--|--| |
||
| 63 | |info|object|| |
||
| 64 | |info.fullname|string|| |
||
| 65 | |info.registerId|string|| |
||
| 66 | |info.customerCode|number|| |
||
| 67 | |info.birthdate|string|| |
||
| 68 | |info.age|number|| |
||
| 69 | |info.marriageStatus|string|| |
||
| 70 | |info.countryOfIncome|string|| |
||
| 71 | |info.education|string|| |
||
| 72 | |info.occupation|string|| |
||
| 73 | |info.office|string|| |
||
| 74 | |info.businessType|string|| |
||
| 75 | |info.position|string|| |
||
| 76 | |info.salary|string|| |
||
| 77 | |info.sourceOfIncome|string|| |
||
| 78 | |info.laserCode|string|| |
||
| 79 | |investmentObjectives|object|| |
||
| 80 | |investmentObjectives.registerId|string|| |
||
| 81 | |investmentObjectives.shortTermInvestment|boolean|| |
||
| 82 | |investmentObjectives.longTermInvestment|boolean|| |
||
| 83 | |investmentObjectives.taxesInvestment|boolean|| |
||
| 84 | |investmentObjectives.retireInvestment|boolean|| |
||
| 85 | |fatca|object|| |
||
| 86 | |fatca.form|object|| |
||
| 87 | |fatca.form.registerId|string|| |
||
| 88 | |fatca.form.isFatca|boolean|| |
||
| 89 | |fatca.form.fatcaInfo|string|| |
||
| 90 | |fatca.form.isKnowLedgeDone|boolean|| |
||
| 91 | |fatca.form.knowLedgeTestResult|number|| |
||
| 92 | |fatca.w8|object / null|| |
||
| 93 | |fatca.w9|object / null|| |
||
| 94 | |suiteTest|object|| |
||
| 95 | |suiteTest.answers|array[string]|| |
||
| 96 | |suiteTest.result|object|| |
||
| 97 | |suiteTest.result.id|string|| |
||
| 98 | |suiteTest.result.registerId|string|| |
||
| 99 | |suiteTest.result.totalScore|number|| |
||
| 100 | |suiteTest.result.level|number|| |
||
| 101 | |suiteTest.result.investorTypeRisk|string|| |
||
| 102 | |suiteTest.result.additional|string|| |
||
| 103 | |suiteTest.result.answers|array[string] / null|| |
||
| 104 | |investorType|object|| |
||
| 105 | |investorType.investorType|number|| |
||
| 106 | |investorType.investorDocumentType|string|| |
||
| 107 | |investorType.investorTypeKnowledge|string|| |
||
| 108 | |investorType.filePath|string|| |
||
| 109 | |selfIdentification|object|| |
||
| 110 | |selfIdentification.laserCode|string|| |
||
| 111 | |||
| 112 | --- |
||
| 113 | |||
| 114 | **5.3 Initialize Appman (Init Appman)**: |
||
| 115 | Used to initialize the Appman verification process. |
||
| 116 | - Endpoint: /api/v1/appman/rekyc/init |
||
| 117 | - Method: GET |
||
| 118 | |||
| 119 | Headers: |
||
| 120 | |key|value|description| |
||
| 121 | |--|--|--| |
||
| 122 | |Content-Type|application/json|| |
||
| 123 | |Authorization|Bearer {token}|| |
||
| 124 | |||
| 125 | Query Parameters: |
||
| 126 | |key|type|description| |
||
| 127 | |--|--|--| |
||
| 128 | |registerId|string|| |
||
| 129 | |||
| 130 | --- |
||
| 131 | |||
| 132 | **5.4 Appman Result**: |
||
| 133 | - Endpoint: /api/v1/appman/rekyc/result |
||
| 134 | - Method: POST |
||
| 135 | |||
| 136 | Headers: |
||
| 137 | |key|value|description| |
||
| 138 | |--|--|--| |
||
| 139 | |Content-Type|application/json|| |
||
| 140 | |||
| 141 | Payload: |
||
| 142 | |key|type|description| |
||
| 143 | |--|--|--| |
||
| 144 | |verifyid|string|| |
||
| 145 | |verified|boolean|| |
||
| 146 | |isMobile|boolean|| |
||
| 147 | |||
| 148 | Response (200 OK): |
||
| 149 | |key|type|description| |
||
| 150 | |--|--|--| |
||
| 151 | |response|object|| |
||
| 152 | |response.registerId|string|| |
||
| 153 | |||
| 154 | --- |
||
| 155 | |||
| 156 | Workflow: |
||
| 157 | <img style="width: 416px;" src="clipboard-202603251233-zm1mp.png"><br> |
||
| 158 | |||
| 159 | ``` |
||
| 160 | @startuml rekyc_sequence |
||
| 161 | |||
| 162 | actor "Foreign Citizen" as u |
||
| 163 | participant "ReKYC Page" as f |
||
| 164 | participant "Backend API" as b |
||
| 165 | database "Database" as d |
||
| 166 | database "Session Storage" as s |
||
| 167 | participant "Appman" as a |
||
| 168 | |||
| 169 | activate u |
||
| 170 | activate f |
||
| 171 | |||
| 172 | group "User info and income" |
||
| 173 | u -> f: access reKYC page |
||
| 174 | f -> b: POST: api/v1/customer/info/rekyc/info |
||
| 175 | activate b |
||
| 176 | b->d: get user data |
||
| 177 | activate d |
||
| 178 | d --> b: |
||
| 179 | deactivate d |
||
| 180 | b --> f: user data |
||
| 181 | deactivate b |
||
| 182 | f->s: store user data in session |
||
| 183 | f --> u: display user data and reKYC form |
||
| 184 | end |
||
| 185 | |||
| 186 | group "Suitability test" |
||
| 187 | u -> f: click "do suitability test" |
||
| 188 | f --> u: redirect to suitability test page |
||
| 189 | u-> f: submit suitability test |
||
| 190 | f->s: update session store |
||
| 191 | f --> u: redirect to reKYC page |
||
| 192 | end |
||
| 193 | |||
| 194 | group "Verification" |
||
| 195 | u->f: click "do verification" |
||
| 196 | f -> b: init appman session |
||
| 197 | activate b |
||
| 198 | b -> a: create appman session |
||
| 199 | activate a |
||
| 200 | a --> b: |
||
| 201 | deactivate a |
||
| 202 | b --> f: appman session id |
||
| 203 | deactivate b |
||
| 204 | f -> a: user do verification on appman page |
||
| 205 | activate a |
||
| 206 | a --> f: |
||
| 207 | deactivate a |
||
| 208 | f -> b: sent appman result |
||
| 209 | activate b |
||
| 210 | b -> a: check appman result |
||
| 211 | activate a |
||
| 212 | a --> b: |
||
| 213 | deactivate a |
||
| 214 | b -> d: store verification result |
||
| 215 | activate d |
||
| 216 | d --> b: |
||
| 217 | deactivate d |
||
| 218 | b --> f: verification result |
||
| 219 | deactivate b |
||
| 220 | f -> s: update session store |
||
| 221 | f --> u: redirect to reKYC page with verification result |
||
| 222 | end |
||
| 223 | |||
| 224 | group "Form Submission" |
||
| 225 | u -> f: fill passport number |
||
| 226 | u -> f: select investor type and upload document |
||
| 227 | u -> f: submit form |
||
| 228 | f->s: update session store with form data |
||
| 229 | f -> b: POST: /api/v1/customer/info/rekyc/update |
||
| 230 | activate b |
||
| 231 | b -> d: store reKYC form data |
||
| 232 | activate d |
||
| 233 | d --> b: |
||
| 234 | deactivate d |
||
| 235 | b --> f: submission result |
||
| 236 | deactivate b |
||
| 237 | f --> u: display submission result |
||
| 238 | end |
||
| 239 | |||
| 240 | deactivate f |
||
| 241 | deactivate u |
||
| 242 | |||
| 243 | @enduml |
||
| 244 | ``` |