Collect verification documents
When an issuer asks for documents, GET /accountHolders/{accountHolderId}/verification lists them in requirements. The verification documents component shows each requirement in a frame on your page, takes the files and submits them. The files go from the user’s browser to the API and never pass through your servers.
Register your origin
In the app, open Settings, then Embedded components, and add the origin of each page that shows the component.
- An origin is a scheme and host, plus a port only when it is not the default, such as
https://app.example.com. No path or trailing slash. - Production accepts only
https. Outside production,http://localhostandhttp://127.0.0.1are also accepted, on any port. - Register up to 10 origins. Removing one stops the component on that site.
Create a session
From your backend, create a session for the account holder and the origin of the page that will show it. The key needs embeddedSessions:write and accountHolders:verify. A platform key sends Account-Holder with the account holder ID; a company key does not.
Send only clientToken to your page. Treat it as a secret:
- It can be redeemed once, within 10 minutes. The component then runs for at most 30 minutes.
- Create a new session each time you show the component. A session that ended cannot be resumed.
- Do not store it, log it or put it in a URL.
- Revoking the key that created the session, or changing its permissions, stops the token from being redeemed.
The session covers every document requirement of the account holder. To narrow it, add target.requirementId for one requirement, or target.userId for the requirements of one person, such as a beneficial owner.
Load the loader
Load the loader with the @outpave/outpave-js npm package or a script tag. Replace APP_HOST with the domain of the web app assigned to your integration. Both load it over HTTPS from this address rather than a copy, so your page receives fixes.
The package adds TypeScript types. loadEmbedded resolves null where there is no window, such as during server rendering, so call it in the browser.
Mount the component
Mount the component in an element on your page, such as <div id="verification-documents"></div>. With getClientToken, the component can offer Start again after its session ends, and calls getClientToken for a new session.
The frame fills the width of container and sets its own height to fit its content. Call instance.unmount() to remove it.
What the user does
The component lists each requirement as Business documents or under the person’s name, with the document types it accepts.
- Files are PDF, JPEG or PNG, up to 10 MB each.
- A requirement takes up to its
maximumDocumentsfiles. A rejected document does not count. - The user selects Submit for review on each requirement once its files are uploaded. The requirement’s
statusbecomesSUBMITTED.
Submitting documents never approves a verification. The issuer’s review decides it.
Options
mount returns an object with two methods:
Callbacks are advisory. Read the outcome from your backend: the session with GET /embeddedSessions/{embeddedSessionId}, and the verification with GET /accountHolders/{accountHolderId}/verification.
Session status
POST /embeddedSessions/{embeddedSessionId}/expire ends a session at once. A running component stops on its next request. Anything already submitted stays submitted.
Events
See Webhooks and events to receive them.