Integrating Persona

How do I drive KYC Manually?

Learn how you can drive the Persona KYC flow manually

Here is an overview of how to integrate the Persona SDK embedded flow:

Example:

<!DOCTYPE html>
<html lang="en">
 <head>
  <meta charset="UTF-8" />
  <title>Client</title>

  <!-- Add this script tag to import Persona JavaScript library -->
  <script src="https://cdn.withpersona.com/dist/persona-v4.9.0.js"></script>
 </head>

 <body></body>
 <script>
  let client = new Persona.Client({
   inquiryId: { persona_inquiry_id },
   language: { language },
   onReady: () => client.open(),
   onEvent: (eventName, metaData) => {
    console.log(`Event: ${eventName}`);
   },
   onComplete: ({ inquiryId, status, fields }) => {
    console.log(`Submitted: ${inquiryId}`);
   },
   onCancel: (inquiryId, sessionToken) =>
    console.log(`Cancelled inquiry: ${inquiryId}`),
   onError: (status, code) => {
    console.log(`Error: ${status}`);
   }
  });
 </script>
</html>