Skip to content

Instantly share code, notes, and snippets.

View fayez-nazzal's full-sized avatar
:octocat:

Fayez Nazzal fayez-nazzal

:octocat:
View GitHub Profile
@fayez-nazzal
fayez-nazzal / sripe-node-guide.md
Created May 3, 2022 12:48
Stripe NodeJS Mini Guide / Cheatsheet

Creating Customers

Attaching a customer to every payment might be very useful, In case of recurring payments or invoices, it is required .

Note: Code samples are minimal to only focus on Stripe, you might want to wrap in try-catch blocks for error handling.

const  stripeAPI  =  require("stripe")(process.env.STRIPE_SECRET_KEY);

// all properties of `customers.create` is optional