Project

General

Profile

Re-KYC » History » Version 2

prin methirattanasophon, 03/25/2026 04:07 AM

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