tre

trexlejs

Api client for Trexle

Showing:

Popularity

Downloads/wk

3

Maintenance

No Maintenance Data Available

Package

Dependencies

1

Size (min+gzip)

5.4KB

License

BSD-2-Clause

Type Definitions

Tree-Shakeable

No?

Categories

Readme

Trexle.js - Node.js module for Trexle

Trexle.js is an node.js API client for Trexle an online recurring subscription billing platform with support to 100+ payments gateways. The module has wrapped all documented Trexle resources.

Getting started

npm install trexlejs

Methods

First instantiate trexlejs by passing in your api key

var Trexle = require('trexlejs');

var trexle = Trexle.setup({
  key: 'yourkey',
  production: false
});
// fields is an object, see the example for more info
trexle.createCard(fields, callback)
trexle.createCustomer(fields, callback)
trexle.refundCharge(chargeId, fields, callback)
trexle.retrieveCharge(chargeId, callback)
trexle.createCharge(fields, callback)
trexle.captureCharge(uncapturedChargeToken, callback)

Example

This is the basic syntax of how to create a new charge, checkout the demos folder for the rest of the methods

var Trexle = require('trexlejs');

var trexle = Trexle.setup({
  key: 'your-api-key',
  production: false
});

trexle.createCharge({
  amount: 400,
  currency: 'usd',
  description: 'test charge',
  email: 'john@trexle.com',
  ip_address: '66.249.79.118',
  card: {
    number: '4242424242424242',
    expiry_month: 8,
    expiry_year: 2018,
    cvc: 123,
    name: 'John Milwood',
    address_line1: '423 Shoreline Park',
    address_city: 'Mountain View',
    address_postcode: 94043,
    address_state: 'CA',
    address_country: 'US'
  }  
}, function (response) {  
  console.log(response.body);
});

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100