Stripe demo

node v10.16.3
version: 1.0.0
endpointsharetweet
const stripe = require("stripe")(process.env.api_testkey_stripe);
stripe.customers.retrieve( process.env.customer_id_stripe, function(err, customer) { console.log(customer.subscriptions.data[0]); for(var i = 0; i<customer.subscriptions.total_count; i++){ console.log("Number of licences: " + customer.subscriptions.data[i].quantity); console.log("Trial ends at: " + customer.subscriptions.data[i].trial_end); } });
Loading…

no comments

    sign in to comment