#1: Razorpay + Node + React Tutorial - Accept payments with Razorpay

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ม.ค. 2025

ความคิดเห็น •

  • @AjayYadav-sm8lc
    @AjayYadav-sm8lc 3 ปีที่แล้ว +19

    things to be fetched from the backendv 17:50
    using razorpay sdk for the node backend 22:45
    creating an order 23:45
    setting payment capture to 1, 26:48
    creating a receipt 28:05
    getting back the order created from the razorpay API and sending it to the frontend 31:38
    cors error 33:00
    verifying the payment with webhook 38:21

  • @ridz4912
    @ridz4912 4 ปีที่แล้ว +14

    Yep, Just like you said I searched and found a lot of videos for stripe intregration but I really wanted to use Razorpay and finally I came across this video of yours and its been a life-saver ! Keep making awesome content like this ! Cheers !

    • @PIYUSH-lz1zq
      @PIYUSH-lz1zq 3 ปีที่แล้ว

      can you tell me how to take user desire amount input please ?
      and how to send mail to correspond user ?

  • @codedamn
    @codedamn  3 ปีที่แล้ว

    Learn Node JS and React by building over 25 Projects: bit.ly/fullstack-codedamn

  • @mamtachahal1277
    @mamtachahal1277 4 ปีที่แล้ว +2

    This is amazing. I was fiddling with the documentation and couldn't come any close to figuring it out. But then I came across your channel and wow. Everything was perfect. You are very very skilled and thanks a lot man. Love from India.

  • @kartikkatahrekartikkatahre2478
    @kartikkatahrekartikkatahre2478 ปีที่แล้ว

    Really loved it 🙂 It was not about only the payment gateway integration but you have shown what are the good practices when you code or implement something step by step. Very informative video overall🙂

  • @kartikpawar7320
    @kartikpawar7320 4 ปีที่แล้ว +4

    Amazing tutorial. Super easy to follow. Waiting for part 2.

    • @codedamn
      @codedamn  4 ปีที่แล้ว +3

      Part 2 is out! th-cam.com/video/QtsvGEB7n0s/w-d-xo.html

    • @PIYUSH-lz1zq
      @PIYUSH-lz1zq 3 ปีที่แล้ว

      can you tell me how to take user desire amount input please ?
      and how to send mail to correspond user ?

  • @yashanand4313
    @yashanand4313 4 ปีที่แล้ว +3

    Thanks a lot man. It's a superb tutorial, easy to follow. I was looking for some tutorial to help me integrate online payment gateway in my MERN stack project of ecommerce website and finally after following this awesome tutorial, I was successful. Thank a lot man.

    • @PIYUSH-lz1zq
      @PIYUSH-lz1zq 3 ปีที่แล้ว

      can you tell me how to take user desire amount input please ?
      and how to send mail to correspond user ?

    • @vedantlahane8893
      @vedantlahane8893 3 ปีที่แล้ว

      @@PIYUSH-lz1zq Just pass in the total amount (bill) in the amount entity of useEffect.

    • @PIYUSH-lz1zq
      @PIYUSH-lz1zq 3 ปีที่แล้ว

      I want to take from frontend

  • @rishabhgupta2085
    @rishabhgupta2085 3 ปีที่แล้ว

    You are awesome. Any other TH-cam would have edited the video past that had errors but you showed us how you debug them. Great 👍

  • @gadgetvala
    @gadgetvala 3 ปีที่แล้ว +2

    Big Fan of your explanation skills :)

  • @ojasmaywade3757
    @ojasmaywade3757 8 หลายเดือนก่อน

    Thank for this simple yet powerful tutorial 🙏

  • @akhileshkanse6020
    @akhileshkanse6020 4 ปีที่แล้ว +4

    I want to build payment gateway through firebase. Any help available here?

    • @siddharthalagesan4460
      @siddharthalagesan4460 4 ปีที่แล้ว

      Can you solve this issue for me please
      stackoverflow.com/q/65048376/13280288

  • @gjdeep
    @gjdeep 2 ปีที่แล้ว

    Thank you so much! i was searching for this!!

  • @taalmalesolution
    @taalmalesolution 3 ปีที่แล้ว

    Sir I have razor pay marchent acount but not received bajaj emi payments by customers plz help to intricate payment method with bajaj emi cArd show

  • @shivamnirne788
    @shivamnirne788 2 ปีที่แล้ว

    How you are handeling the late authorized payments ?

  • @thecomputermind1
    @thecomputermind1 3 ปีที่แล้ว

    How to create your own wallet system

  • @vaitheeswaranj7736
    @vaitheeswaranj7736 3 ปีที่แล้ว +1

    Hey, amazing tutorial series, I found the docs pretty hard to understand. I have a problem where my json returned from my backend (the promise that gets stored in 'data') has a value of null. I followed through the rest of this tutorial using hardcoded order_id values. Can you help me with this?

  • @malharjajoo7393
    @malharjajoo7393 3 ปีที่แล้ว

    Would it be a better (from efficiency/security point of view) to fill the Razorpay checkout form
    in backend and then fetch it in the frontend ?

  • @kanakagarwal7320
    @kanakagarwal7320 4 ปีที่แล้ว

    Thanks mehul bhaiya, it was so helpful for me

  • @atulsharma6296
    @atulsharma6296 4 ปีที่แล้ว

    I was making an eCommerce website using redux I am not getting what I need I m new to the react world and I am stuck on this for more than 3 days if possible
    I already have backend and frontend setup
    but I need to know where all the code go while using redux useDispatch and useSelector useEffect what code should go in the controllers and server.js and so on

  • @jannath-hussain
    @jannath-hussain 3 ปีที่แล้ว +1

    Awesome 👏, i want the extensions or plugin names which you are using in visual code

  • @YatheeshRaju
    @YatheeshRaju 3 ปีที่แล้ว

    ❤ thankyou amazing finally able to add payment to my app

  • @kishanbs4320
    @kishanbs4320 2 ปีที่แล้ว

    hi while using test key its working fine but in production key is showing technical issues why?

  • @PIYUSH-lz1zq
    @PIYUSH-lz1zq 3 ปีที่แล้ว

    can you tell me how to take user desire amount input please ?
    and how to send mail to correspond user ?

  • @trap4089
    @trap4089 2 ปีที่แล้ว

    Can't we just directly put that script tag?

  • @reaper6449
    @reaper6449 4 ปีที่แล้ว

    I am getting only payment id in response, there is no order id and signature id. I am generating order id from backend and using it in front end but still having the same problem

  • @smitagravat1063
    @smitagravat1063 2 ปีที่แล้ว

    Can u make tutorial for subscription base model with razorpay

  • @ATHULYALOGISTICS-pt3pe
    @ATHULYALOGISTICS-pt3pe 11 หลายเดือนก่อน

    Can you make a Razorpay subscription tutorial for WordPress website with complete guide...

  • @underdoggaming5880
    @underdoggaming5880 3 ปีที่แล้ว

    Can you please make a quick video or article on how to send payment receipt via email on successful payment please.

  • @AlbertoRodriguez-oe6jo
    @AlbertoRodriguez-oe6jo 2 ปีที่แล้ว

    Extremely useful, thank you so much.

  • @firdousProgrammer
    @firdousProgrammer 3 ปีที่แล้ว

    Why every video on youtube is showing the integration with razorpay standard checkout ? No one has shown the custom checkout page.

    • @consoledoterror971
      @consoledoterror971 3 ปีที่แล้ว

      Most people have problems with standard checkout. So ....

  • @shraddhabhaik6638
    @shraddhabhaik6638 3 ปีที่แล้ว +1

    Showing Error ERROR ReferenceError: RazorPay is not defined

  • @saurabh1745
    @saurabh1745 4 ปีที่แล้ว

    It was really helpful .........can you please make video on spliting of payment in different account on same project?

  • @BharathA-bq6bc
    @BharathA-bq6bc 8 หลายเดือนก่อน

    Hey thanks man it is very help full

  • @donaldtrump1902
    @donaldtrump1902 2 ปีที่แล้ว

    I keep getting error Amount should be in Paisa integer and minimum is 1 rupees
    I converted amount to Paisa still the error

  • @gauthamkshatriya2953
    @gauthamkshatriya2953 2 ปีที่แล้ว

    is it possible to add addional value in handler? to send it to database? like ammount and order id?

  • @dante_ele
    @dante_ele 3 ปีที่แล้ว

    How to get that colorful terminal?

  • @dhananjaydhoke6101
    @dhananjaydhoke6101 2 ปีที่แล้ว

    I am not getting that js code on rozarpay site

  • @SinghJasmohan
    @SinghJasmohan 4 ปีที่แล้ว

    very helpful... thanks and please keep making such videos.

    • @codedamn
      @codedamn  4 ปีที่แล้ว

      Thanks Jasmohan!

  • @nidhisbhat3473
    @nidhisbhat3473 3 ปีที่แล้ว

    You have not generated orderId . its showing error when on live mode

  • @indu3084
    @indu3084 4 ปีที่แล้ว

    U r such a good person. Thank u sooo much for the video

  • @musictrader8990
    @musictrader8990 4 ปีที่แล้ว

    You made my life much easier. Thank you for the video.

    • @codedamn
      @codedamn  4 ปีที่แล้ว

      Thank you too Vivek!

  • @chinmaykulkarni2879
    @chinmaykulkarni2879 3 ปีที่แล้ว

    The razorpay console is not showing the right amount, the amount in the response is ₹75999 but it shows only ₹759...... same is the case even if i did amount*100

  • @menacerify
    @menacerify 4 ปีที่แล้ว

    Would this work with a nextjs application ? I just created a server/index.js file, But what about routing ? Do I need to serve the pages from the express app itself ?

    • @codedamn
      @codedamn  4 ปีที่แล้ว +2

      It would work. You do not need to create custom server. You can make use of Next.js API routes for this. I'll probably create a video on Next.js + Razorpay integration soon

    • @menacerify
      @menacerify 4 ปีที่แล้ว

      @@codedamn Yes please! That would be super helpful. So I created a custom express server mainly because I need to integrate razorpay into my nextjs app. Thanks for your content btw, really helpful 😁

    • @menacerify
      @menacerify 4 ปีที่แล้ว

      @@codedamn This worked! I used Next.js API routes and it worked like a charm. Thanks my guy :)

    • @damandeepsingh8412
      @damandeepsingh8412 3 ปีที่แล้ว

      @@menacerify Hey, i am also impleting it in NextJS, can you please share your code, it would be helpful.

  • @aayushishah512
    @aayushishah512 4 ปีที่แล้ว

    UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'create' of undefined
    razorpay.orders is showing as undefined.. Any idea what could be wrong?

    • @codedamn
      @codedamn  4 ปีที่แล้ว

      How are you creating the 'razorpay' object? Can you post some code

    • @aayushishah512
      @aayushishah512 4 ปีที่แล้ว

      Sure..
      This my React component
      github.com/aayushah711/revv-hackathon/blob/master/porfolio/src/Components/Razorpay.jsx
      This is the part where express comes in picture
      github.com/aayushah711/revv-hackathon/blob/master/porfolio/src/backend/index.js

  • @amanali9501
    @amanali9501 3 ปีที่แล้ว

    Plz 🙏 make a video on integration of PayU on MERN Stack

  • @mrbizapps2551
    @mrbizapps2551 4 ปีที่แล้ว

    Explained well...can you plz mk video on how to implement Razorpay subscriptions plz

  • @user-zp1dv4yh5e
    @user-zp1dv4yh5e 3 ปีที่แล้ว

    Hey, how to integrate this with Firebase

  • @krohan1202
    @krohan1202 3 ปีที่แล้ว

    How can I change the amount in the backend depending on the cart's total amount...instead of using just an integer?

    • @himalayshankar9882
      @himalayshankar9882 3 ปีที่แล้ว +1

      You will have to send the total cart amount as a body when you will be using fetch the razorpay api

  • @ganapathisubramanyamjayam
    @ganapathisubramanyamjayam 4 ปีที่แล้ว

    can this be used in react native?

  • @yadneshkhode3091
    @yadneshkhode3091 3 ปีที่แล้ว

    Bhaaaaaaaai ek number !!!!!

  • @anurag9110
    @anurag9110 4 ปีที่แล้ว

    We are using the API keys in the App. How can we keep them safe and secure?

    • @codedamn
      @codedamn  4 ปีที่แล้ว

      You should need only one key exposed to client side. That is fine, you can use the razorpay webhook secret to verify the transaction integrity

  • @nicetomeetugaming7024
    @nicetomeetugaming7024 2 ปีที่แล้ว

    Very good idea sir!

  • @ashwingowda2604
    @ashwingowda2604 4 ปีที่แล้ว

    Here, you are fixing the amount to $5 or ₹5. But what if I want it to be Dynamic? How to work on dynamic amount?

    • @codedamn
      @codedamn  4 ปีที่แล้ว +2

      You can get the dynamic amount from client side (in case of like donations), validate the amount on backend, and create an order dynamically on backend replacing the constant price with a variable.

  • @malharjajoo7393
    @malharjajoo7393 3 ปีที่แล้ว

    Great tutorial !

  • @lavanyacheemakurthy
    @lavanyacheemakurthy 3 ปีที่แล้ว

    wow.... This is so amazing!!

  • @saunaknandi1814
    @saunaknandi1814 3 ปีที่แล้ว

    Is using razorpay completely free or it will charge after time?

  • @prakad97
    @prakad97 4 ปีที่แล้ว

    Glad you did it man..thanks..!

    • @codedamn
      @codedamn  4 ปีที่แล้ว

      Thank you too Prakad

  • @venkatesh2788
    @venkatesh2788 3 ปีที่แล้ว

    Sir please make razorpay onboarding like stripe express like automate user payment

  • @mayur.a15
    @mayur.a15 4 ปีที่แล้ว

    is this production ready code? can I use your github code in prouduction?

    • @codedamn
      @codedamn  4 ปีที่แล้ว +1

      Yes you can. It has backend validation in place which is important

  • @ashutoshpanda4336
    @ashutoshpanda4336 4 ปีที่แล้ว

    Hey man it's beautiful but do you have this with angular.... I've my final assessment in my Company if you can help... Please I couldn't find any good resource..... IF you've the code kindly

    • @codedamn
      @codedamn  4 ปีที่แล้ว +1

      I believe the core concept with Angular is also same. Create click handler, call Razorpay API and it’s done

  • @tarunkishore4574
    @tarunkishore4574 4 ปีที่แล้ว

    Is the Verification part in the back end a necessary ?

    • @codedamn
      @codedamn  4 ปีที่แล้ว +1

      Yes. You don’t want people to fake payments

    • @Fairybook1997
      @Fairybook1997 3 ปีที่แล้ว

      Ya, U need to have a grip on node.js bro, Hope this reply is worth 2 u

  • @prachisingh7030
    @prachisingh7030 4 ปีที่แล้ว

    Will I get notification on my mobile if I choose UPI payment in test mode?

    • @pranavkumar1818
      @pranavkumar1818 4 ปีที่แล้ว

      no!

    • @prachisingh7030
      @prachisingh7030 4 ปีที่แล้ว

      @@pranavkumar1818 Thank you! Can you please tell- after verification of signature how to send response to the front-end(React) that the payment is successful?

    • @pranavkumar1818
      @pranavkumar1818 4 ปีที่แล้ว +1

      @@prachisingh7030 Hey Prachi, he explains that in the video around 38:03 . Thats what razorpay send back in case of a confirmed payment. However he suggests not to depend on that and instead use webhooks to make sure payment capture (money actually transferred to your account). I am a bit confused there myself. a webhook will tell my server that money is actually transferred. But how do I tell my client that (react-native app in my case).

    • @prachisingh7030
      @prachisingh7030 4 ปีที่แล้ว

      @@pranavkumar1818Can we do a thing! When the signature is verified we save the transaction id , order id etc in mongodb and then in the client side fetch the data inside handler according to Order id.(If the data of that particular order id was saved then It would be fetched otherwise no data!)

    • @pranavkumar1818
      @pranavkumar1818 4 ปีที่แล้ว +1

      @@prachisingh7030 I will tell what i did. Dont know if its correct (i think it is), also I am building on react-native. After payment is done, i am sending the signature , paymentId & orderId to my server. Here i am fetching my document containing this orderId n other info (amount, timestamp etc) & fetching the orderId. I am taking this orderId(from my doc) and along with signature, generating the hmac digest. matching it with the signature. If the signature matches, I am using razorPay.orders.fetch(req.body.order_id) to get the current status of the orderId. if its "paid", that means my order was captured, so I am returning an OK along with some message to my client to do further processing. Hope this helps.

  • @nothingbutspace8422
    @nothingbutspace8422 3 ปีที่แล้ว

    Does this work only for web or for android too?

    • @codedamn
      @codedamn  3 ปีที่แล้ว +1

      Backend will be the same, the frontend could also technically work if you're using something like Ionic. Otherwise, try using the razorpay android SDK or something, not sure what they provide on mobile.

    • @nothingbutspace8422
      @nothingbutspace8422 3 ปีที่แล้ว

      @@codedamn Thank you. I'll check out the razorpay android SDK

  • @Fairybook1997
    @Fairybook1997 3 ปีที่แล้ว

    Working man awesome

  • @praveen_javali
    @praveen_javali 4 ปีที่แล้ว

    Thank you , very helpful .

  • @sourabhbankar9380
    @sourabhbankar9380 4 ปีที่แล้ว +1

    Thank you it helped me alot

    • @codedamn
      @codedamn  4 ปีที่แล้ว

      Thank you too Sourabh

  • @hardikdesai7693
    @hardikdesai7693 4 ปีที่แล้ว

    Hey there How do I pass dynamic amount and name .

    • @tarunbisht2000
      @tarunbisht2000 3 ปีที่แล้ว +1

      server code me db se price leke amount me bhej de frontend ko

  • @arihanthirawat6574
    @arihanthirawat6574 4 ปีที่แล้ว

    can i use this same for react native? please reply fast.

    • @codedamn
      @codedamn  4 ปีที่แล้ว

      For React Native your frontend react code would be different. Your backend validation could remain same

    • @arihanthirawat6574
      @arihanthirawat6574 4 ปีที่แล้ว

      @@codedamn can you please make a video on that too

  • @iHariPatel
    @iHariPatel 2 ปีที่แล้ว

    I think razorpay automatically validate checksum.

  • @kumaresansampathkumar9633
    @kumaresansampathkumar9633 4 ปีที่แล้ว

    thank you so much for your videos

  • @temirbekerkinbekov34
    @temirbekerkinbekov34 3 ปีที่แล้ว

    What countries does it support? Can it support Kyrgyzstan?

    • @codedamn
      @codedamn  3 ปีที่แล้ว

      For receiving payments? I think yes. As merchants, I believe India only for now.

  • @suraj1990ify
    @suraj1990ify 4 ปีที่แล้ว

    Bro how to customize payment link please make a video in this regarding

    • @codedamn
      @codedamn  4 ปีที่แล้ว

      What do you mean?

  • @arpitkumarmishra6220
    @arpitkumarmishra6220 4 ปีที่แล้ว

    thanks for this awesome video.................well I am getting the error ""serviceworker" must be a dictionary in your web app manifest.".....
    if anyone else has faced the same while using Razorpay with react.....kindly suggest a solution

    • @PIYUSH-lz1zq
      @PIYUSH-lz1zq 3 ปีที่แล้ว

      can you tell me how to take user desire amount input please ?
      and how to send mail to correspond user ?

  • @PrinceUpadhyayneeraj
    @PrinceUpadhyayneeraj 4 ปีที่แล้ว +1

    Make Tutorial on razorpay integration with python django

    • @codedamn
      @codedamn  4 ปีที่แล้ว

      Django isn't really my stack. The concepts remain same though :)

  • @ankurUdey
    @ankurUdey 3 ปีที่แล้ว

    Thank you so much :)

  • @adi-kotkar
    @adi-kotkar 4 ปีที่แล้ว

    Well prepared tutorial!!!, It worked completely fine for me...Thanks

    • @codedamn
      @codedamn  4 ปีที่แล้ว +1

      Thank you Aditya

  • @Aakash-lz5ou
    @Aakash-lz5ou 3 ปีที่แล้ว

    Doubt sir:
    React is updated, now it don't have "Backend" folder, it directly have "node modules" folder
    So, How to make index.js API ?

  • @abhishekkumarsingh8833
    @abhishekkumarsingh8833 4 ปีที่แล้ว

    Thanks a lot bro

  • @rounak308
    @rounak308 4 ปีที่แล้ว

    make some content for type script too

  • @husler7424
    @husler7424 3 ปีที่แล้ว

    It would have been better if you had provided Demo first

  • @jitho7596
    @jitho7596 4 ปีที่แล้ว

    Thankss a lot...............................................................................................................................

  • @kamilakin6866
    @kamilakin6866 4 ปีที่แล้ว

    Hey codedamn, I really appreciate for your effort to prepare those videos.
    But man, I watched like 200 ad in 20 min, just release your courses on Udemy or somewhere some patreon link something.
    This doesn't helping to learn

  • @whit3rose
    @whit3rose 4 ปีที่แล้ว

    TBH I am grateful for the video but please you are confusing by changing the function names and moving the code all over the place. I'm really sorry for the rude comment.

  • @bestclips3046
    @bestclips3046 2 ปีที่แล้ว

    What if the amount is entered by the user?

  • @aseemsavio6696
    @aseemsavio6696 3 ปีที่แล้ว +2

    29:02 Been there, done that LMAO

    • @codedamn
      @codedamn  3 ปีที่แล้ว +1

      Haven't we all, haha 😂

  • @gantavyasaraswat2130
    @gantavyasaraswat2130 2 ปีที่แล้ว

    Reduce the background music please , thats very loud .

  • @iHariPatel
    @iHariPatel 2 ปีที่แล้ว

    It's easier than Paytm ,

  • @siddarthbhave8642
    @siddarthbhave8642 4 ปีที่แล้ว

    Yo how tf are you soo smart

    • @codedamn
      @codedamn  4 ปีที่แล้ว

      I just read docs lol

  • @neilkapadia7
    @neilkapadia7 3 ปีที่แล้ว

    So many ads in one tutorial

  • @adarshs1750
    @adarshs1750 3 ปีที่แล้ว +1

    : - )

  • @shivrajnag12
    @shivrajnag12 4 ปีที่แล้ว

    Razorpay Sucks.....

    • @codedamn
      @codedamn  4 ปีที่แล้ว

      We don’t have a lot of good alternatives in India apart from Razorpay