The Good Tenant Popup Verificaion library provides convenient access to the Good Tenants Verification API from
applications written in JavaScript/TypeScript.
Documentation
See the Good Tenant Docs for Documentation.
Requirements
Node 12 or higher.
Installation
Install the package with:
npm install verification-package
yarn add verification-package
Usage
The package needs to be configured with your account's secret key, which is
available in the [Good Tenants Dashboard][api-keys]. Require it with the key's
value:
Usage with TypeScript
Import Verfication as a default import (not * as verification-package
, unlike the DefinitelyTyped version)
and instantiate the verification using Verification.setup()
with the latest API version.
import Verification from "verification-package";
function initVerification() {
Verification.setup({
first_name: "john",
last_name: "doe",
email: "johndoe@mail.com",
purpose: "residential" or "commercial"
key: "pk_test_....",
onClose: () => console.log("close"),
callback: () => console.log("success"),
});
}
initVerification();
Support
New features and bug fixes are released on the latest major version of the verification-package
package.
More Information
Development
Run all tests:
$ yarn install
$ yarn test
If you do not have yarn
installed, you can get it with npm install --global yarn