chargify-promise

0.0.3 • Public • Published

Chargify API Node.js (unofficial module)

Installation:

$ npm install --save chargify-promise
const chargify = new Chargify(config.subdomain, config.apiKey);

Create a new customer in Chargify:

chargify.customer.create({
customer:{
  first_name: "Joe",
  last_name: "Blow",
  email: "joe@test.com"
}
}).then((customer)=>{
  console.log(customer)
});

Or

async function createCustomer() {
 
  const customer = await chargify.customer.create({
  customer:{
    first_name: "Joe",
    last_name: "Blow",
    email: "joe@test.com"
  }
});
 
console.log(customer)
}

Available resources and methods

  • customer
    • list(queryObject)
    • create(customerObject)
    • update(updateObject)
    • read(customer_id)
    • delete(customer_id)
  • subscription
    • list(queryObject)
    • create(subscriptionObject)
    • update(updateObject)
    • read(id)
    • delete(id)
  • product
    • list(queryObject)
    • create(family_id, productObject)
    • update(updateObject)
    • read(id)
    • archive(id)

Package Sidebar

Install

npm i chargify-promise

Weekly Downloads

0

Version

0.0.3

License

MIT

Unpacked Size

9.01 kB

Total Files

4

Last publish

Collaborators

  • bgwaltney