Chargebee Demo

node v10.15.3
version: 1.0.0
endpointsharetweet
var chargebee = require('chargebee'); chargebee.configure({site : "capmo-demo-test", api_key : process.env.api_testkey_chargebee});
chargebee.subscription.list({ "customer_id[is]": process.env.customer_id_chargebee }).request(function(error,result) { if(error){ //handle error console.log(error); }else{ for(var i = 0; i < result.list.length;i++){ var entry=result.list[i] var subscription = entry.subscription; var customer = entry.customer; var card = entry.card; console.log(subscription); console.log("Number of licences: " + subscription.plan_quantity); } } });
Loading…

no comments

    sign in to comment