How to add Stripe payment module to medusajs 2.0

How to add Stripe payment module to medusajs 2.0

Video Instructions

Stripe module medusa 2.0 documentation: https://docs.medusajs.com/v2/resources/commerce-modules/payment/payment-provider/stripe
GitHub repo config example: https://github.com/rpuls/medusajs-2.0-for-railway-boilerplate/blob/master/backend/medusa-config.js
Video demonstartion of signing up a Stripe account (watch from 01:30 - 06:30): https://www.youtube.com/watch?v=gqX4j9Ms7Lo&t=98s

One-click Deploy tutorial:

Medusa 2.0 is finally here
In this article you will find a 1-click deploy template, so with zero effort you can get your very own medusajs 2.0 preview instance, at its current state.

Everything you need for copy/paste

Webhook url: https://<your-backend-url>/hooks/payment/stripe

Payment events:
payment_intent.succeeded
payment_intent.amount_capturable_updated
payment_intent.payment_failed

Backend environment variable names:
STRIPE_API_KEY & STRIPE_WEBHOOK_SECRET

Storefron environment variable name:
NEXT_PUBLIC_STRIPE_KEY