Question

Do I need to add Stripe webhooks ip addresses to my droplet?

Following is the Stripe documentation. I’m using webhooks in my MERN stack, which is on a droplet.

Your integration must be able to reach any of Stripe’s fully qualified domain names for it to function properly. Depending on how your integration operates, you may need add them to an allowlist.

To help your integration operate securely, it must also verify that it’s communicating with api.stripe.com through one of our listed IP addresses.

If your integration also receives webhooks from us, make sure these events originate from a Stripe webhook IP address.

They include a list of their ip addresses for webhooks. Does this mean I need to whitelist them? Thanks in advance!


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
June 16, 2024

Hey!

If you are not using any firewall, there is nothing additional you need to do. Your integration should function properly out of the box.

If you are using a firewall, feel free to share more details on the exact firewall that you are using and I will be happy to guide you through on how you could allow those Stripe IPs.

For example, if you are using a software firewall like UFW on your Droplet, you would need to access your droplet via SSH and then:

  • Update your firewall rules to allow incoming requests from Stripe’s IP addresses. For example, using UFW, you can add a rule like this:

    sudo ufw allow from <Stripe IP address>
    
  • Verify that the rule is in place:

    sudo ufw status
    

If you’re using a DigitalOcean managed Cloud Firewall, you can refer to the documentation to add the necessary rules.

- Bobby

KFSys
Site Moderator
Site Moderator badge
June 16, 2024

Heya,

You need to whitelist them only if you are blocking these type of connections with your Firewall.

If you are blocking calls on ports, you might need to allow them, yes.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.