{"_id":"@deposits/kysync-sdk","_rev":"3-b087cbe6de1526281fd3b1fe3feba1c0","name":"@deposits/kysync-sdk","dist-tags":{"latest":"0.1.0"},"versions":{"0.0.1":{"name":"@deposits/kysync-sdk","version":"0.0.1","keywords":["kyc","kyb","kysync","identity","deposits"],"author":{"name":"Deposits"},"license":"ISC","_id":"@deposits/kysync-sdk@0.0.1","maintainers":[{"name":"ericmcwinner","email":"mcwinnerwebdeveloper@gmail.com"},{"name":"deposits_dev","email":"developers@deposits.com"}],"homepage":"https://github.com/DepositsTeam/kysync-sdk#readme","bugs":{"url":"https://github.com/DepositsTeam/kysync-sdk/issues"},"dist":{"shasum":"058bdada682cb85e403efbe61f91ead26efd3661","tarball":"https://registry.npmjs.org/@deposits/kysync-sdk/-/kysync-sdk-0.0.1.tgz","fileCount":5,"integrity":"sha512-oXrAiWmg3UHWHfQqJYYMf7vBqrj5vfvwHblOV+b9A+yevzF+S7sQq+oebXu8TZZFNs+GLc6GiYFd4M/gZy6CUg==","signatures":[{"sig":"MEUCIDXEbsx5HDLXDvXqxBbEplI6Vwv/ulIXT8zCP6gkU9HsAiEAj0Y/ILhZhl8WR7Gy9fcsPwOnqiT/YkXc6GCoPjFF+4o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22278,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj9LzqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpTQA/6A5XKYY8dq+8MGhCwTynOEXUlMSEeDmzN0y1bFLbLcLQ/WnTw\r\nJ2QQvhqNareMoCdCAKeUlZsb2lmtJrsbscyN5Oov1Mxyej03eCaMxZewM6b+\r\ncY/rB4c5IrbHA7OG1T44SJVYV3xLkqP7t3F9Q5fN/snDrQqzTPd3DLNPJtDO\r\nC4yf7nxnXyhOlK3Ryj0HP9+ApiN7ugHjyz/5pvQk/UdzV/+Ic4vhvc3ZSQrg\r\nh3dS9q/fuJAhhhym6V4Xmi4+0y6IojlQOeKruUNGYqEts1969/JO2gvww2mv\r\nE/wLWybRTxlzqbd8WYJ6Pc7atucXW3uJcu/rTfEBlP7ycjGMP0S0qhscjtxA\r\nt5VfFF2h8RFFOnH0JD7X8HeRiHHQmO5isUS+qNLfd3kAsrc8TyxmIcxqsMtn\r\nhEHURN5Z6QxKWc1I6ut9X3Nqy70xuHk9iiwETbki/ENEe8PUhV/SuLU9QHn8\r\n3mq4+xOXOCWVVLQvQcYpcOucZO2O4q5q4d6c+VnArdRUbHnVhOKASC5mNgQs\r\n3XYPJry9VbsKennf0Q//YmBiN6BwirrddaWTZ/l/TBPbLWySq46MqLvu0VYH\r\nXEvSwFjPWtbkF/tYd3wgPnLhiGwiu3oTN4cLJNRnv/kRCY4K7pSZ8RwG9Dir\r\n1w4JUkROqn78bKWup8dRzjQIRpYb/jQrD1I=\r\n=Tgf9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"package/index.js","gitHead":"22b5af7ba243c58f25ac1b5305fd9379da8ecce7","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ericmcwinner","email":"mcwinnerwebdeveloper@gmail.com"},"repository":{"url":"git+https://github.com/DepositsTeam/kysync-sdk.git","type":"git"},"_npmVersion":"8.19.3","description":"","directories":{},"_nodeVersion":"19.2.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/kysync-sdk_0.0.1_1676983529955_0.09368706052422637","host":"s3://npm-registry-packages"}},"0.0.2":{"name":"@deposits/kysync-sdk","version":"0.0.2","keywords":["kyc","kyb","kysync","identity","deposits"],"author":{"name":"Deposits"},"license":"MIT","_id":"@deposits/kysync-sdk@0.0.2","maintainers":[{"name":"ericmcwinner","email":"mcwinnerwebdeveloper@gmail.com"},{"name":"deposits_dev","email":"developers@deposits.com"}],"homepage":"https://github.com/DepositsTeam/kysync-sdk#readme","bugs":{"url":"https://github.com/DepositsTeam/kysync-sdk/issues"},"dist":{"shasum":"afbe85f2ddf40d41b94639504d2971f96a390f0e","tarball":"https://registry.npmjs.org/@deposits/kysync-sdk/-/kysync-sdk-0.0.2.tgz","fileCount":5,"integrity":"sha512-jtPUfCdk4CwTwKSyKan+NT+RbapR+NTeAwwezHrzTah2HcNLHVduGRjXR90xrXcei5pF68iAfXkpoawhRh2KYQ==","signatures":[{"sig":"MEQCIEmCIcVGlZyGG6oiYsVlE8NmT7Vy0oblqPthZz0iwjQbAiBXmEx9hrOhjYVMaGWsMgSOUu91vCipYv6KQe5wHTTbSQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22488,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj9MIGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp+3xAAgf1dZT329hqKrn/vu0HqLTziDObZhssszfNPqKh86EyWoZW8\r\nGloqEXmCIOyQxXYhNW9UF5Wpi+gyH2AbmMg1MjH7SnWSrZKmG1BA/iHLPpJ+\r\ngjUKxsUOTSgB+jKpNRzr+tQ177Sk4Brpa44tAL9ZR2MoJDSRqhz+U2vxm2qj\r\nyQIUnrtYJKDGFgIZeDxOGS5ACLE/1BobYp67gEeB41xpOGvfRG+iUEZ8y5JR\r\nJ7ebo6IpZDhVVED8Lx5yosGG0hS7X5A2KNCwCtLKKr06vWdeEuyibSnapYyN\r\nH+cj2+wZPDDf+Hq7ICog5ouxdqKQxpwpl9OlqjGjSY30hMYCZqquI4k9yluh\r\n7oAHTJmbsCzoW8FVAOr18NM5CkMy2WW9y14L1YQpz8zrucxtXe8HtxcprWEu\r\nwxVbVTwFIuXHT6Aitjed1roKzaF/0qvNb0MotThOOe2eCIwkd6zZVhHEB1LS\r\ndLwCWhzXVbF32OwFUMPtr+byqDx0TqZWJgu9kSUEOm8Wz83ij2NEOD/7qntw\r\ngsE6NUsPW9bix4Vb/6qK2Vp9CZzXfBDXHbVzRV5OomHiPlRgsfjs62++44S5\r\nUwBUfZQF909OBGj6jm03p6g8UuQpKalW9n7EoBFFyDGoLcYHwBSmLB5ZwLC4\r\n2Hk93a+Ssnz5xNBfV4hT8ufCwvVI8RHVT5Q=\r\n=vl0I\r\n-----END PGP SIGNATURE-----\r\n"},"main":"package/index.js","gitHead":"5a763dfe3566bbda5a2396113b6dd834d9a93e11","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ericmcwinner","email":"mcwinnerwebdeveloper@gmail.com"},"repository":{"url":"git+https://github.com/DepositsTeam/kysync-sdk.git","type":"git"},"_npmVersion":"8.19.3","description":"","directories":{},"_nodeVersion":"19.2.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/kysync-sdk_0.0.2_1676984837883_0.24865155695628927","host":"s3://npm-registry-packages"}},"0.0.3":{"name":"@deposits/kysync-sdk","version":"0.0.3","keywords":["kyc","kyb","kysync","identity","deposits"],"author":{"name":"Deposits"},"license":"MIT","_id":"@deposits/kysync-sdk@0.0.3","maintainers":[{"name":"ericmcwinner","email":"mcwinnerwebdeveloper@gmail.com"},{"name":"deposits_dev","email":"developers@deposits.com"}],"homepage":"https://github.com/DepositsTeam/kysync-sdk#readme","bugs":{"url":"https://github.com/DepositsTeam/kysync-sdk/issues"},"dist":{"shasum":"2e602faba5d2343cdc299aec3de1a999c31f95b6","tarball":"https://registry.npmjs.org/@deposits/kysync-sdk/-/kysync-sdk-0.0.3.tgz","fileCount":5,"integrity":"sha512-6MK0ZIwI1gnzwAyDWtSoetqHrcnR/5MV88a7kfGik+5lh/Fj1cxvAtDzJ7Dx5o20o6PngXVi4nTtmKSPvOzV2g==","signatures":[{"sig":"MEYCIQCH3XshArluPPAOZXcelkrKOXmH+kyKjR1euhRIPQAyewIhAIjS1i1dNlSp9oC3j3SUKr9LGcia8bqgAIi4eO8q2+7h","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22533,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj/SUXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpv/g/7Bb1bBHmwZwKQrXBwJ6CSYJphFYM9gzQF7+JVqxQGbpj30f1/\r\npH8DkPCVA5MSi2ePQZEwSmc+BGoy3/1yu5PyRq8XMZdxX83JEZgwkpSWUx+D\r\nMc6xx31qxRIumjhxAOEnh/RgylrqnfeHGq594bKGrB2jBw/l/NuFFnAAffd+\r\naT61wEv1PCzEHrS0vHrYPIiEvoSG9ZaTqAj8mDkvGFMBe/A/0FuteCQKoRky\r\nEwN5foZM3Wn34MW4u8cnoEcTC43YiBq9zeYXLg/wcKU9zzWST1zUKO/LevM2\r\nYG+RIuCNNF8qQNqidfrrVSkxrksJr1ze03a0zm1fosQMS3a9l4etv96rJvfa\r\nKVurjTi7JKqxFpByaGcKo0mkzu3YLk0DKuUoEJ0eIkvmIU+r88m79AozZXHB\r\n13zsAYWyePLuvZ4ZtUT7Eswuygf7Ck+GIzV1J5q3+KFoNO2gsxYdBGFZwPBc\r\nseHdt0Gd1IoZNYVLT9LlN45P1cZsxKN7w3EseMAR39FaI1J4T+T/S+Uh1gec\r\nR0USNAbWwhpG5zgTqW2qpZ+DYG5cJ1Q0Aip4WiiFtS5Xk+NnofiWw/EoEcXS\r\nTTMMvBnawl17XKQL1K8lmqlfEk5Vx5Zat7kIHXmvmolzK3IJ563EifrIHJLq\r\nsm9ZyYWhZ88430a8Kl2lqMpFy7u98eGwfu8=\r\n=+gtA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"package/index.js","gitHead":"5a763dfe3566bbda5a2396113b6dd834d9a93e11","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"ericmcwinner","email":"mcwinnerwebdeveloper@gmail.com"},"repository":{"url":"git+https://github.com/DepositsTeam/kysync-sdk.git","type":"git"},"_npmVersion":"9.5.0","description":"","directories":{},"_nodeVersion":"19.7.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/kysync-sdk_0.0.3_1677534487208_0.819213833142157","host":"s3://npm-registry-packages"}},"0.1.0":{"name":"@deposits/kysync-sdk","version":"0.1.0","description":"","main":"package/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/DepositsTeam/kysync-sdk.git"},"keywords":["kyc","kyb","kysync","identity","deposits"],"author":{"name":"Deposits"},"license":"MIT","bugs":{"url":"https://github.com/DepositsTeam/kysync-sdk/issues"},"homepage":"https://github.com/DepositsTeam/kysync-sdk#readme","devDependencies":{"prettier":"^2.8.4"},"_id":"@deposits/kysync-sdk@0.1.0","gitHead":"f952d7e90e44830d87b8ab775ba058c3ccee12f6","_nodeVersion":"20.18.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-6hCXMCsLoOd95dz9JZSQs1L8BDOel5NLZ9jmq3CbJ5wOsrXrBLi+OP/zwCPSynE2kiE5aY/mLhvuJq9uNJeRiw==","shasum":"3c1034670f43a9f077582a15277cce4e2a41a4a1","tarball":"https://registry.npmjs.org/@deposits/kysync-sdk/-/kysync-sdk-0.1.0.tgz","fileCount":6,"unpackedSize":26219,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC5uNNzErq6VIOPhojWljjW5qQ5YVQaxcdnzZiq8vsgrAIgHYW0Ujd4T/oizH2uHdOqadLyOoa9zhaAPpmixIh2Js4="}]},"_npmUser":{"name":"ericmcwinner","email":"mcwinnerwebdeveloper@gmail.com"},"directories":{},"maintainers":[{"name":"deposits_dev","email":"developers@deposits.inc"},{"name":"ericmcwinner","email":"mcwinnerwebdeveloper@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/kysync-sdk_0.1.0_1733960815275_0.26899844705652565"},"_hasShrinkwrap":false}},"time":{"created":"2023-02-21T12:45:29.884Z","modified":"2024-12-11T23:46:55.699Z","0.0.1":"2023-02-21T12:45:30.146Z","0.0.2":"2023-02-21T13:07:18.026Z","0.0.3":"2023-02-27T21:48:07.360Z","0.1.0":"2024-12-11T23:46:55.470Z"},"bugs":{"url":"https://github.com/DepositsTeam/kysync-sdk/issues"},"author":{"name":"Deposits"},"license":"MIT","homepage":"https://github.com/DepositsTeam/kysync-sdk#readme","keywords":["kyc","kyb","kysync","identity","deposits"],"repository":{"type":"git","url":"git+https://github.com/DepositsTeam/kysync-sdk.git"},"maintainers":[{"name":"deposits_dev","email":"developers@deposits.inc"},{"name":"ericmcwinner","email":"mcwinnerwebdeveloper@gmail.com"}],"readme":"# Deposits KySync Web SDK\n\n\n\nThe Deposits KySync SDK enables financial services to embed identity verification to new or existing onboarding workflows. This SDK uses the Kysync API services from Deposits. You can get API keys from your Deposits program on the console, [here](https://launch.new) or view the sandbox [here](https://kysync-web.deposits.dev/).\n\n  \n\n## To Initiate the SDK\nYou have to first import our Javascript SDK. We have created examples that can guide you on sandbox and production.\n\n#### Example\n\nExample in sandbox\n```sh\nhttps://api.deposits.dev/example/kysync\n```\nExample in production\n```sh\nhttps://api.ondeposits.com/example/kysync\n```\n\n#### How to use\n\nSDK Url and JS Import in sandbox\n```sh\nhttps://api.deposits.dev/sdk/kysync.js\n\n<script src=\"https://api.deposits.dev/sdk/kysync.js\"></script>\n```\nSDK Url and JS Import in production\n```sh\nhttps://api.ondeposits.com/sdk/kysync.js\n\n<script src=\"https://api.ondeposits.com/sdk/kysync.js\"></script>\n```\n\nThe second line of code imports our SDK to your web page. With this, you can call the appropriate function to initiate the Deposits KySync flow.\n  \n\nBelow is what an implementation of the `DepositsKysync` would look like:\n\n```sh\n<!DOCTYPE html>\n<html lang=“en”>\n<head>\n  <title>KySync Demo</title>\n</head>\n<body>\n    <div id=\"content\">\n        <div id=\"form\">\n            <div class=\"card\">\n                <div id=\"title\">\n                    <img src=\"https://assets.deposits.inc/img/logo/deposits_square/png/logo_main.png\" alt=\"deposits.dev\" />\n                    <p id=\"reducedMargin\" class=\"ui-heading heroNew h5\">\n                        Deposits KySync Demo\n                    </p>\n                </div>\n                                <div class=\"text-center mt-5\">\n                    <h5>User could not be retrieved</h5>\n                </div>\n                                                <div class=\"text-center\">\n                    <h5>Business could not be retrieved</h5>\n                </div>\n                            </div>\n        </div>\n    </div>\n\n    <script src=\"https://api.dev.deposits.dev/sdk/kysync.js\"></script>\n    <script>\n        let public_key = ''\n        document.getElementById(\"initiate_kyc\").addEventListener(\"click\", function(e) {\n            public_key = document.getElementById(\"public_key\").value;\n            let access_id = document.getElementById(\"user_access_id\").value;\n            let entity_type = 'user'\n            DepositsKysync({\n                public_key,\n                access_id,\n                redirect_url: \"https://ondeposits.com\",\n                entity_type,\n                callback: (data) => {\n                    console.log(\"callback\", data);\n                },\n            });\n        });\n        document.getElementById(\"initiate_kyb\").addEventListener(\"click\", function(e) {\n            public_key = document.getElementById(\"public_key\").value;\n            let access_id = document.getElementById(\"business_access_id\").value;\n            let entity_type = 'business'\n            DepositsKysync({\n                public_key,\n                access_id,\n                redirect_url: \"https://ondeposits.com\",\n                entity_type,\n                callback: (data) => {\n                    console.log(\"callback\", data);\n                },\n            });\n        });\n    </script>\n</body>\n</html>\n\n```\n\n```\ndocument.getElementById(\"initiate_kyc\").addEventListener(\"click\", function (e) {\n        // code\n    }\n)\n```\n\nThis is an event listener that lets your webpage know when to call our SDK to initiate the KYC/KYB process. It tells the web page to initiate the KySync experience when the user clicks on the button, it is also possible to programatically click the button via a page load event or mouse move if you prefer to trigger the KySync process tourself.\n\n`public_key = document.getElementById(\"public_key\").value;`\n`let access_id = document.getElementById(\"user_access_id\").value;`\n`let access_id = document.getElementById(\"business_access_id\").value;`\n\nUsing the code above, we get the information about the program and the user or the business. \nThe public key can be gotten from the program/tenant page of our Console while \nThe user access id can be gotten from the endpoint below\n```sh\n{{baseUrl}}/user/refresh-kyc\n```\nThe business access id can be gotten from the endpoint below\n```sh\n{{baseUrl}}/user/business/refresh-kyb\n```\n##### Base Url\nExample in sandbox\n```sh\nhttps://api.deposits.dev/api/v2\n```\nExample in production\n```sh\nhttps://api.ondeposits.com/api/v2\n```\n\n```sh\nDepositsKysync({\n    public_key,\n    access_id,\n    redirect_url: \"https://ondeposits.com\",\n    entity_type,\n    callback: (data) => {\n        console.log(\"callback\", data);\n    },\n});\n```\n\nCalling the `DepositsKysync` function initiates the KySync process. This function becomes available in your code because of the script we imported initially. This function expects a single argument which is an object that gives the SDK all the information it needs to properly initiate KYC/KYB.\n  \n##### Successful KYC/KYB\nIf the KYC/KYB process is successful, a response similar to this will be gotten:\n\n```\n{\n\t“data”: {\n\t\t“public_key”: “”,\n\t\t“access_id”: “”\n\t},\n\t“message”: “KYC/KYB successful”,\n\t“status”: “success”\n}\n```\n\n##### Callbacks & Redirects\nAfter calling `DepositsKysync` and the KYC/KYB process is completed, what happens next?\nThere are two options to determine this.\n\n1. Callbacks: With callbacks, you specify the Javascript function for us to call after the KYC/KYB process has been successful.\n\n2. Redirects: If you specify a redirect_url like we specified in the example above, your customers will be directed to that URL after successful payment.\n\n###### PS: \nIt is important to note that a redirect takes precedence over a callback. What this means is that if a redirect_url is specified, it will be called rather than the callback.\n\n##### Cancelled KYC/KYB\nIf the customer closes the KySync modal before making payment or clicks \"Cancel\", we'll cancel the KySync session, hide the modal, and you won't be notified. If you do want to be notified, though, you can specify an onclose function. We'll call this function if the KySync popup is cancelled.\n\n  \n#### Framework Integrations\nThe SDK is framework agnostic, it is universal for any Javascript framework. This SDK is written in pure Javascript, it can be used with any Javascript framework, like React, Vue, etc.\n  \n\n## Features\n\n**Simplified Security**: We make it simple for you to collect sensitive data such as Social Security Number. This means the sensitive data is sent directly to Deposits instead of passing through your server.\n\n  \n\n## Contributing\n\nOnly members of the deposits team can contribute to this. You can create an issue if you find a bug or have any challenge using this SDK.\n","readmeFilename":"README.md"}