1.1.0 • Published 7 years ago

instantmerchant-node v1.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

Instant Merchant API for Node.JS.

=========

A Node.JS reference implementation of the Instant Merchant API. See the full docs at https://advisantgroup.github.io/InstantMerchant/?javascript/

  • Official
  • REST API
  • JSON Data Format
  • Promise Implementation

Installation

  npm install instantmerchant-node

Configuration

var Imn = require('instantmerchant-node'),
  	instant = new Imn({
		  key : "your IM API key",
		  secret : "your secret key",
      version : "v1 (or) v2",
      mode : "live (or) test"
	});

API Overview

Every resource method returns a promise, so you don't have to use the regular callback. E.g.

	var params = {
		name: 'Name',
	    username: 'username',
	    email: 'email',
	    address: 'address',
	    city: 'city',
	    zip: zip code,
	    state: 'state',
	    country: 'US' //us, usa, US, USA
	};
    instant.customer.create(params).then(function(res){
    	//Success
    },function(err){
    	//Error Handling
    }).catch(function(err){
    	//Error Handling
    });

Available resources & methods

Where you see params it is a plain JavaScript object, e.g. { name: 'foo' }

Release History

* 1.0.0 Initial release
* 1.0.2 Subscription api added
* 1.0.3 Cards api added
* 1.1.0 Documentation updated