We are trying to query the Stripe API using Python3.7. According to documentation here, the syntax is this.
import stripe
stripe.api_key = "sk_test_GsmQDvulES2VzWpDTGF5rNHj"
stripe.Customer.search(query="email:'sally@rocketrides.io'")
In our codebase we have a variable that holds the value of the email address. We have tried the following, but they all result in error. The variable is "email_id"
customer_object = stripe.Customer.search(query="email:'email_id'")
customer_object = stripe.Customer.search(query="email: \'' email_id \''")
customer_object = stripe.Customer.search(query= {
"email: email_id
})
Can you please suggest the right syntax? Thanks.