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

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

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

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel