Jack tileman
Jack tileman

Reputation: 871

Network communication with Stripe failed - Google App Engine Python 3.7

We have a call to Stripe from our App Engine application. App engine is Standard, Python 3.7

The requirements.txt is as follows

jinja2
pytz
stripe
flask
google-cloud-firestore==1.9.0

We are making a stripe call function like this

        stripe.api_key = self.stripe_api_key
       
        payment_intent_response = stripe.PaymentIntent.create(
            payment_method_types    = payment_method_types_array,
            amount                  = payment_amount,
            currency                = payment_currency,
            stripe_account                = {stripe_account_id})

When we execute the above code we get the error "Network communication with Stripe failed". Please help.

Upvotes: 0

Views: 155

Answers (1)

Nolan H
Nolan H

Reputation: 7419

You should run the Stripe reachability tool to check that your server is able to reach Stripe's API, in particular you'll need to ensure you can reach these IP addresses. Your network may be blocking egress and preventing proper functioning of the client.

Upvotes: 1

Related Questions