π₯ Enrollment β Initiate External Identification API #
Gateway Path: /Enrollment/initiate-external-identification
Service: Customer Relationship Management (CRM)
Method: POST
Auth: Bearer token in Authorization
header
1) π Overview & Purpose #
Starts an external KYC identity verification session with Borica.
On success, the API returns a URL that, once opened by the user (browser/webview), launches Boricaβs flow: ID scan β liveness/selfie β cloud QES signing of Boricaβs documents.
β Redirects after completion: After signing and pressing Continue in Boricaβs UI, Borica redirects the user back to your application:
Success Redirect URL β used when the identification completes successfully.
Fail Redirect URL β used when the process fails or is aborted.
Both URLs are configured in the Merchant Portal (per tenant/project) and are not passed in this API request.
2) π Endpoint Definition #
HTTP: POST /Enrollment/initiate-external-identification
Headers #
-
Authorization: Bearer <token>
β valid access token -
Content-Type: application/json
Request Body (example) #
Fields #
-
userId (integer, required, int32) β User identifier. Range:
1..2147483647
. -
isRestartIdentification (boolean, optional, default: false) β Force a fresh session if one exists.
-
localTimezone (string | null, optional) β IANA TZ, e.g.,
Europe/Sofia
. -
userAgent (string | null, optional) β Client UA (for diagnostics).
-
browserLanguage (string | null, optional) β e.g.,
bg
,en-US
. -
userLanguage (string | null, optional) β Preferred UI language.
-
deviceName (string | null, optional) β Friendly device label.
-
correlationType (integer, optional, enum: 0, 1) β Correlation flag for CRM tracking.
βΉοΈ Redirect URLs are configured in the Merchant Portal and associated with the merchant/app; the CRM passes them to Borica when creating the session. They are not included in this request body.
3) π‘ Responses #
β 3.1 Success β 200 OK #
-
videoIdentificationUrl (string) β Open to begin Boricaβs identification flow.
-
videoIdentificationStatus (string) β Typically
STARTED
. -
message (string) β Optional informational text.
β 3.2 Server Error β 500 Internal Server Error #
Unexpected failure. Body usually empty (inspect logs/trace).
4) π Redirect Handling (VERY IMPORTANT) #
-
After the user signs with cloud QES and clicks Continue, Borica redirects:
-
to your Success Redirect URL on successful identification;
-
to your Fail Redirect URL if the flow fails, times out, or the user aborts.
-
-
These URLs are pre-configured in the Merchant Portal (per merchant/app).
-
Your frontend should:
-
Trust only whitelisted domains you control;
-
Show a clear success/failure state to the user;
-
Optionally trigger a status check (if your system exposes a status endpoint) to confirm final state before proceeding.
-
π Security tip: enforce strict allowlists for redirect domains and avoid reflecting arbitrary query parameters.
5) π‘ Validation Rules #
-
userId: required; integer
1..2147483647
. -
correlationType: if provided, must be
0
or1
. -
localTimezone: valid IANA TZ if provided.
-
Languages: ISO tags recommended (
bg
,en
,bg-BG
). -
Restart logic:
isRestartIdentification=true
may supersede incomplete sessions.
6) π» Examples #
6.1 cURL #
curl -X POST "https://api-test.10npay.com/Enrollment/initiate-external-identification" \
-H "Authorization: Bearer <YOUR_SECRET_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"userId": 2077,
"isRestartIdentification": false,
"localTimezone": "Europe/Sofia",
"userAgent": "Chrome/139.0",
"browserLanguage": "bg",
"userLanguage": "bg",
"deviceName": "MacBook Pro",
"correlationType": 0
}' -i
6.3 JavaScript (fetch) #
7) π Sequence (with Redirects) #
-
Client β API Gateway:
POST /Enrollment/initiate-external-identification
(Bearer, JSON) -
Gateway β CRM/Orchestrator: Create Borica session (includes merchant-configured Success/Fail redirect URLs)
-
Gateway β Client:
200 OK
withvideoIdentificationUrl
-
Client: Open
videoIdentificationUrl
(web/webview) -
Borica Flow: ID scan β liveness β cloud QES signing
-
Borica β App: Redirect user to Success or Fail URL (from Merchant Portal)
-
App: Render final state and, if applicable, confirm status / continue KYC