Created
February 19, 2022 00:28
-
-
Save chrisjsimpson/910ea43a5bf85cade5a51a2ae652828c to your computer and use it in GitHub Desktop.
This file contains 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 | |
import os | |
STRIPE_API_KEY = os.getenv("STRIPE_API_KEY") | |
stripe.api_key = STRIPE_API_KEY | |
accounts = stripe.Account.list(limit=3) | |
for account in accounts.auto_paging_iter(): | |
if ( | |
"Soap Subscription" in account.business_profile.name | |
or "Business Name" in account.business_profile.name | |
): | |
# If we get here, then it's a test Stripe account | |
# which we can safley delete | |
result = stripe.Account.delete(account.id) | |
print(result) | |
print("All test shops deleted") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment