interopdata
v0.0.15-alpha
Published
Interopdata API wrapper
Downloads
4
Maintainers
Readme
Interopdata Node.js Library
Installation
Install the package with:
npm install interopdata
# or
yarn add interopdata
Usage
The package needs to be configured with your account's secret key, which is available in the Interopdata Dashboard. Require it with the key's value:
const interopdata = require('interopdata')('sk_live...');
interopdata.customers.create({
id: 'customer-id'
})
.then(customer => console.log(customer.id))
.catch(error => console.error(error));
Or using ES modules and async
/await
:
import Interopdata from 'interopdata';
const interopdata = new Interopdata('sk_live_...');
const customer = await interopdata.customers.create({
id: 'customer-id'
});
console.log(customer);