Created
November 12, 2016 17:18
-
-
Save adamjstevenson/d40abd2659f83f900771a7fdc82cb494 to your computer and use it in GitHub Desktop.
Stripe: Auto-paginate and print charge IDs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import stripe | |
stripe.api_key = "YOUR-TEST-KEY" | |
# Retrieve all charges | |
charges = stripe.Charge.all(limit=100) | |
# Use auto-pagination to iterate through them | |
for charge in charges.auto_paging_iter(): | |
# Output charge IDs | |
print(charge.id) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment