mai-ks-ui-lib
v1.0.0
Published
Integrate MAI-KYC into your Application.
Downloads
76
Maintainers
Readme
Mai Kyc Aggrigator
Integrate MAI-KYC into your Application.
Prerequisites
- git
- npm
- react
Examples
Installation
import {Provider} from "mai-kyc-aggregator";
BASIC EXAMPLE:
const [kycResponse, setKycResponse] = useState("")
const payload = {
userId: "sdfsdgsdfgfg1",
firstName: "Anuj",
lastName: "Anuj",
mobile_no: "8425928181",
email: "[email protected]",
nationality: "IND",
redirect_back_url: "https://onboardxsandbox.authbridge.com/mycode/post-data",
type: "KYC",
};
const header = {
"x-api-key": "832d87bb962f0db2803c89ba4b105f41981428aa8b2b4bd220789087bb7e10a5e847b5340090988398c5f9d163298ae7c00546255777ad95b9f053f88320d283",
environment_url: "http://localhost:8000/v1"
}
console.log({ kycResponse })
return (
<div >
<Provider payload={payload} headers={header} setKycResponse={setKycResponse} />
</div>
);
FULL EXAMPLE:
import React, { useState } from 'react';
import Provider from "../src/component/Provider";
function App() {
const [kycResponse, setKycResponse] = useState("")
const payload = {
userId: "sdfsdgsdfgfg1",
firstName: "Anuj",
lastName: "Anuj",
mobile_no: "8425928181",
email: "[email protected]",
nationality: "IND",
redirect_back_url: "https://onboardxsandbox.authbridge.com/mycode/post-data",
type: "KYC",
};
const header = {
"x-api-key": "832d87bb962f0db2803c89ba4b105f41981428aa8b2b4bd220789087bb7e10a5e847b5340090988398c5f9d163298ae7c00546255777ad95b9f053f88320d283",
environment_url: "http://localhost:8000/v1"
}
console.log({ kycResponse })
return (
<div >
<Provider payload={payload} headers={header} setKycResponse={setKycResponse} />
</div>
);
}
export default App;