Links

Get balances

Tags: #stripe #balances #snippet #operations #dataframe
Author: Martin Donadieu

Input

Import libraries

try:
import stripe
except:
!pip install stripe
import stripe
import pandas as pd

Variables

api_key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"

Model

Connect to the API

stripe.api_key = api_key
balance = stripe.BalanceTransaction.list(limit=30)

Output

Get the balance

pd.DataFrame(balance.get('data'))