Skip to content

GoPayWin/api-client-nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoPayWin API Client for Node.js

This branch is under active development. For more information please visit: www.gopaywin.com

@gopaywin on Twitter GoPayWin on NPM

Installation

npm install --save gopaywin-api-client

Usage

The following call will fetch all orders for the API keys' owner. Be sure to pass configuration data as shown.

var api = require('gopaywin-api-client');
var configuration = {
  "keys": {
    "publishable_key" : "...",
    "private_key"     : "..."
  },
  "api_version": "0.1",
  "api_host": "https://sandbox.fpa.bz/"
}

api.get("orders", configuration)
  .then(function(response){
    console.log(response.body.orders);
  })
  .catch(function(error){
    console.log(error);
  });

Links