Ubivar node.js bindings
Ubivar is an API that takes over the hassle of automatically screening
e-payment for frauds on e-commerce websites.
Ubivar's purpose is to route e-commerce transactions given their estimated
risk. By default, the three possible routing outcomes are a suggested
rejection, a recommended manual verification, and a proposed acceptance of the
transaction. Ubivar does not need all the business events (aka resources
),
however the more it has contextual information about the transactions, the
better its accuracy. The two required resources are the transactions
and the
labels
that categorize the transactions
like fraud, not fraud. The API is
simple: you provide Ubivar your request token
and the bindings provide the
hooks to send and receive resources to the API.
Install
npm install ubivar
Documentation
Documentation is available at https://ubivar.com/docs/nodejs
API Overview
Every resource is accessed via your ubivar
instance:
var Ubivar = require("ubivar")
, ubivar = new Ubivar("your-token", "your-api-version")
Every resource accepts an optional callback as the last argument.
ubivar.accounts.create( {
"user_id" : "test_123"
, "session_id" : "test_session_id_123"
, "user_email" : "test_email@email-123.com"
, "first_name" : "test_yourfirstname_123"
, "last_name" : "test_yourlastname_123"
, "primary_phone" : "+123456789-123"
}, function(err, resource){
err
resource
})
Available resources and methods
Configuration
ubivar.set("auth", "your-api-token")
ubivar.setTimeout(20000) // in ms
, node's default is 120000ms
More information / wikis
Development
To run the tests, you will need a Ubivar test API key (from your Ubivar dashboard)
export UBIVAR_TEST_TOKEN="your-test-api-key"
npm install -g mocha
npm test
Note: on Windows, use SET
instead of export
for setting the UBIVAR_TEST_TOKEN
environment variable.
Author
Originally inspired from stripe-node. Developed by Fabrice Colas (fabrice.colas@gmail.com). Maintained by Ubivar.