2.0.0 • Published 10 months ago

cashfree-verification v2.0.0

Weekly downloads
-
License
Apache
Repository
github
Last release
10 months ago

Cashfree VRS Node SDK

GitHub Discord GitHub last commit (branch) GitHub release (with filter) npm GitHub forks Coverage Status

The Cashfree VRS Node SDK offers a convenient solution to access Cashfree VRS APIs from a server-side JavaScript applications.

Documentation

Cashfree's Verification Suite API Documentation - https://docs.cashfree.com/reference/verification-api-overview

Learn and understand verification workflows at Cashfree Payments here

Try out our interactive guides at Cashfree Dev Studio !

Getting Started

Installation

npm i cashfree-verification

Configuration

import { Cashfree } from "cashfree-verification"; 

Cashfree.XClientId = "<x-client-id>";
Cashfree.XClientSecret = "<x-client-secret>";
Cashfree.XEnvironment = Cashfree.Environment.SANDBOX;

Generate your API keys (x-client-id , x-client-secret) from Cashfree Merchant Dashboard

Basic Usage

VoterId Verification

var request = {
    "verification_id": 'uniqueVerificationId',
    "epic_number": 'UAI4574761',
    "name": 'John Doe',
}

Cashfree.VrsVoterIdVerification(request).then((response) => {
    console.log('Verification Response:', response.data);
})
.catch((error) => {
    console.error('Error in verification request:', error);
});

Liveliness Check

const image = fs.createReadStream(<path-to-image>);
Cashfree.VrsLivelinessCheck("uniqueVerificationId",image).then((response) => {
    console.log('Verification Response:', response.data);
})
.catch((error) => {
    console.error('Error in verification request:', error);
});

Supported Resources

Licence

Apache Licensed. See LICENSE.md for more details

2.0.0

10 months ago

1.0.1

1 year ago

1.0.0

2 years ago