@startujn render { direction: down; arrow_spacing: 24 } journey KYC_ID_CHECK "Verify your identity on your phone" description: "Account opening: photograph an ID and take a selfie on the phone, then see the result on the computer" unique_id_friendly: kyc_id_check start from_onboarding { description: "Account opening, step 3" } view scan_qr { type: waiting; title: "Continue on your phone"; description: "QR code, renewed every 15 min"; route: /onboarding/identity } handoff phone { title: "Switch to phone"; description: "The user scans the QR code"; channel: QR code; timeout: 15 min; resume: /id/m/:session } view id_photo { title: "Photograph your ID and face"; description: "ID front and back, then a selfie"; route: /id/m/:session } view blurry { type: toast; title: "Photo not readable"; description: "Blur or glare; take it again" } view code_expired { title: "Code expired"; description: "Shown on the phone"; route: /id/m/expired } handoff to_computer { title: "Back to the computer"; description: "The phone says the photos are sent"; channel: computer; resume: /onboarding/identity/check } action check { title: "Check identity" description: "Document and face match" trace: [req:KYC-02, test:e2e/kyc-id-check.spec.ts] unique_id: 6aeaa669701 ' AUTO GENERATED - DO NOT CHANGE } system provider { type: external; title: "Identity check provider"; host: api.idcheck.example } view verified { title: "Identity verified"; route: /onboarding/verified } action open_review { type: fork } view reviewing { title: "We are checking your documents"; description: "Usually within a day"; route: /onboarding/review } actor compliance { title: "Compliance agent"; role: Back office; description: "Reviews unclear checks" } action email_approved { type: message; title: "Email: you are verified"; channel: email } action email_rejected { type: message; title: "Email: not verified"; channel: email } view rejected { title: "We could not verify you"; route: /onboarding/not-verified } end done { type: success; description: "Account opened" } end refused { type: failure; description: "Not verified" } from_onboarding --> scan_qr scan_qr --> phone : [Scan QR code] phone ..> id_photo : [Open link] valid phone ..> code_expired : [Open link] expired code_expired -up-> phone : [Scan the new code] id_photo -right-x-> blurry : [Take photo] blurry or glare blurry .x.> id_photo id_photo --> to_computer : [Submit] { payload: [id_images, selfie] } to_computer ..> check : [Return to the computer] check -right-> provider { payload: [id_images, selfie] } provider ..> check { payload: [result] } check --> verified : verified check --> open_review : unclear check -x-> rejected : rejected open_review --> reviewing open_review --> compliance compliance --> email_approved : [Approve] compliance -x-> email_rejected : [Reject] email_approved --> verified email_rejected --> rejected verified -right-> done : [Continue] rejected -right-> refused : [Close] @endujn