persona
TypeScript icon, indicating that this package has built-in type declarations

5.0.0-alpha.2 • Public • Published

Persona Inquiry JavaScript SDK

The official JavaScript client library for the Persona Inquiry flow.

Table of Contents

Documentation

The module provides a client for the Persona embedded flow.

Getting Started

npm install persona

To open the flow you must create a Client object.

import { Client } from 'persona';

const client = new Client({
  // This refers to a production demo template owned by Persona
  templateId: 'itmpl_Ygs16MKTkA6obnF8C3Rb17dm',
  environment: 'sandbox',
  onReady: () => client.open(),
  onComplete: ({ inquiryId, status, fields }) => console.log('onComplete'),
  onCancel: ({ inquiryId, sessionToken }) => console.log('onCancel'),
  onError: (error) => console.log(error),
});

Contributing

Please see Contributing for guidelines and instructions for local development.

License

MIT

/persona/

    Package Sidebar

    Install

    npm i persona

    Weekly Downloads

    55,641

    Version

    5.0.0-alpha.2

    License

    MIT

    Unpacked Size

    75.6 kB

    Total Files

    19

    Last publish

    Collaborators

    • charlesyeh
    • lewisf
    • 4ndypanda
    • timhwang21
    • salvatoret
    • bowenwp
    • personabill