Skip to content

tommotorefi/alloy-kyc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

Add this line to your application's Gemfile:

gem 'alloy-kyc'

And then execute:

$ bundle

Or install it yourself as:

$ gem install alloy-kyc

Usage

Configure the gem using your issued Alloy credentials in an initializer file. For example, in config/initializers/alloy-kyc.rb:

Alloy::KYC.configure do |config|
  config.application_token = ENV['ALLOY_APPLICATION_TOKEN']
  config.application_secret = ENV['ALLOY_APPLICATION_SECRET']
end

Create a new evaluation:

Alloy::KYC::Evaluation.create({
    phone_number: "18042562188",
    name_first: "Thomas",
    name_last: "Nicholas",
    email_address: "[email protected]",
    birth_date: "1985-01-23",
    address_line_1: "1717 E Test St",
    address_city: "Richmond",
    address_state: "VA",
    document_ssn: "123456789",
    address_postal_code: "23220",
    address_country_code: "US",
    social_twitter: "tommyrva"
  })

If evaluation requires further information around out-of-wallet questions:

evaluation = Alloy::KYC::Evaluation.create({phone_number: "18042562188", name_first: "Thomas",...})
if evaluation.requires_oow?
  # collect answers and either match locally or resubmit
  updated_evaluation = evaluation.submit_oow_responses(responses)
end

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/qedinvestors/alloy-kyc.

License

The gem is available as open source under the terms of the MIT License.

About

A simple wrapper for the Alloy.co KYC wrapper

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published