Steps to reproduce:
-
00:00 - Sign in to Stripe
-
00:42 - Retrieve your API Key
-
01:01 - Prepare your Stripe API integration
mkdir ttfac-stripe cd ttfac-stripe npm init --yes yarn add stripe touch index.js code .
-
02:08 - In your editor, copy/paste the code below to retrieve your Stripe's balance
const Stripe = require("stripe"); const stripe = Stripe(process.env.STRIPE_API_KEY); stripe.balance.retrieve(function (err, balance) { console.log(balance); });
You can look at the Stripe API reference and copy/paste snippets. Here's the one in use above.
-
04:31 - Run the code with
STRIPE_API_KEY="..." node index.js
and press enter. -
05:00 - TTFAC for Stripe