DocumentationAPI Reference
DocumentationAPI ReferenceStatus


Use the client's methods to show or hide the embedded flow.

<script src=""></script>

  const client = new Persona.Client({
    templateId: "tmpl_JAZjHuAT738Q63BdgCuEJQre",
    environment: "sandbox",
    onComplete: ({ inquiryId, status, fields }) => {
      // Inquiry completed. Optionally tell your server about it.
      console.log(`Sending finished inquiry ${inquiryId} to backend`);
  function openClient() {; }
  function cancelClient() { client.cancel(true); }
open()Use to show the embedded flow.
cancel(force: boolean)Use client.cancel(false) to transition to the cancel confirmation screen. Use client.cancel(true) to instantly hide the the embedded flow without displaying the cancel confirmation screen.