Parameters

Creating inquiries

The most common way to set up the embedded flow is to specify a templateId. This will create a new inquiry on every visit.

Optionally, you can connect new inquiries to an account. To connect the inquiry to an account, specify either referenceId or accountId. You cannot specify both.

For more details on the callback parameters, see Event Handling.

ParametersRequirementDescription
templateIdRequiredThis template ID corresponds to a pre-set configuration and determines how the flow is customized.
environmentThe Persona API environment on which to create inquiries. For sandbox and production, use sandbox and production respectively.
referenceIdYou can generate and provide a unique ID which we will associate with the inquiry. The identifier can be used to monitor user progress in newly created inquiries. Inquiries with the same reference ID will be grouped under a single account.
accountIdID of the account to associate newly created inquiries with.
languageSpecify a supported language to localize the flow. Language will be inferred from browser settings by default.
prefillProvide an object to prefill form inputs in the flow. Each attribute in the object is optional. See Prefill documentation.
onStartA function that is called when an individual starts the flow. The function should expect a single argument, a string inquiry ID that references the in-progress inquiry.
onCompleteA function that is called when an individual verified their identity. It is passed the inquiry ID.
onFailA function that is called when an individual fails the inquiry flow. It is passed the inquiry ID.
onLoadA function that is called when the Persona module has finished loading. Calls to open() prior to the onLoad callback will still open the flow, and a loading spinner will be shown.
onExitA function that is called when an individual has specifically exited the flow without completing. The function should expect two arguments, a nullable error object and a metadata object.
onEventA function that is called when an individual reaches certain points in the inquiry flow. The function should expect two arguments, an eventName string and a metadata object.
noteAvailable on versions >= 3.4.0. Unstructured text field for your custom use.

Resuming an inquiry

To resume an existing inquiry instead of creating a new one, use the inquiryId parameter. Do not pass a templateId when resuming the inquiry.

If the inquiry already has submitted verifications, you need to specify an accessToken as well. You can generate a token with the /api/v1/inquiries/<inquiry-id>/resume endpoint. The token will be accessible as meta['session-token'].

For more details on the callback parameters, see Event Handling.

ParameterRequiredDescription
inquiryIdRequiredSpecify an inquiry ID to resume an existing inquiry. The accessToken parameter is required if the inquiry's status is pending.
accessTokenWhen resuming an inquiry with a pending status, you must also generate an access token from the /api/v1/inquiries/<inquiry-id>/resume endpoint.
languageSpecify a supported language to localize the flow. Language will be inferred from browser settings by default.
prefillProvide an object to prefill form inputs in the flow. Each attribute in the object is optional.
onStartA function that is called when an individual starts the flow. The function should expect a single argument, a string inquiry ID that references the in-progress inquiry.
onCompleteA function that is called when the individual has successfully verified their identity. It is passed the inquiry ID.
onFailA function that is called when the individual has successfully verified their identity. It is passed the inquiry ID.
onLoadA function that is called when the Persona module has finished loading. Calls to open() prior to the onLoad callback will still open the flow, and a loading spinner will be shown.
onExitA function that is called when the individual has specifically exited the flow without completing. The function should expect two arguments, a nullable error object and a metadata object.
onEventA function that is called when the individual reaches certain points in the inquiry flow. The function should expect two arguments, an eventName string and a metadata object.
noteAvailable on versions >= 3.4.0. Unstructured text field for your custom use.