Get charges
Tags: #stripe #charges #snippet
Author: Martin Donadieu

Input

Import libraries

1
try:
2
import stripe
3
except:
4
!pip install stripe
5
import stripe
6
import pandas as pd
Copied!
1
api_key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"
Copied!

Model

Connect to the API

1
stripe.api_key = api_key
Copied!
1
charges = stripe.Charge.list(limit=30)
Copied!

Output

Display result

1
pd.DataFrame(charges.get('data'))
Copied!
Copy link
Edit on GitHub