$ 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: "[email protected]"
}
}).then((customer)=>{
console.log(customer)
});
Or
async function createCustomer() {
const customer = await chargify.customer.create({
customer:{
first_name: "Joe",
last_name: "Blow",
email: "[email protected]"
}
});
console.log(customer)
}
- 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)