Skip to content

Instantly share code, notes, and snippets.

@nickfogle
Last active September 9, 2021 17:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nickfogle/6eda9de6e96d9803c1614995eaa731e6 to your computer and use it in GitHub Desktop.
Save nickfogle/6eda9de6e96d9803c1614995eaa731e6 to your computer and use it in GitHub Desktop.
Get Stripe Customer - Example Python
import stripe
stripe.api_key = "sk_test_XXXXXXX"
# Pass customer email to API endpoint
customers = stripe.Customer.list(email='customer@email.com')
print(customers)
print([cus.id for cus in customers.data])
# take cus.id and pass as CUSTOMER_ID in hmac function here https://gist.github.com/nickfogle/82dba67f7e1f730ca2f147a263e35508
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment