---
title: "Discussion on \"Razorpay integration in React\" | Hashnode"
description: "Discussion on \"Razorpay integration in React\". In this guide, we will briefly discuss how to add Razorpay as a mode to accept money from users on a React based website. The project stack discussed here is only in JavaScript. Before we proceed, I highly encourage you to watch these two videos to u..."
url: "https://hashnode.com/posts/razorpay-integration-in-react/60106855b5b03f4bf00e417e"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Razorpay integration in React](https://blog.learncodeonline.in/razorpay-integration-in-react?utm_source=hashnode&utm_medium=feed)

In this guide, we will briefly discuss how to add Razorpay as a mode to accept money from users on a React based website. The project stack discussed here is only in JavaScript. Before we proceed, I highly encourage you to watch these two videos to u...

Jan 26, 2021 · 11 min read · blog.learncodeonline.in  
Read the article

-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#javascript](https://hashnode.com/tag/javascript)

## Written by

[Anirudh Jwala](https://hashnode.com/@theJwala)

@theJwala · India

  
[View profile](https://hashnode.com/@theJwala)

i often forget dates. so, i better write down

## Responses 3

Markdown supported · ⌘↵ to post

[Ayush Bommana](https://hashnode.com/@ayushbommana)

[Nov 12, 2022](https://hashnode.com/posts/razorpay-integration-in-react/60106855b5b03f4bf00e417e/comment/636f92acc83b2a23bd2bb0c5)

Nice but how to put the amount dynamically instead of hardcoding it as 499?

[Anirudh Jwala](https://hashnode.com/@theJwala)

[Nov 12, 2022](https://hashnode.com/posts/razorpay-integration-in-react/60106855b5b03f4bf00e417e/comment/636f92acc83b2a23bd2bb0c5#reply-6370014c156201257c945d99)

In the node side, add a new .get() route -> to fetch list of cards data and map in react to show user. When they click pay, make call to .post("/razorpay")

In options object avoid hardcoding of 499, rather use async function and await on "<collection>.findOne()" (or) find().select() whichever you want to use and set that integer value

[Abdur Rahman](https://hashnode.com/@Abu2k)

[Apr 18, 2022](https://hashnode.com/posts/razorpay-integration-in-react/60106855b5b03f4bf00e417e/comment/625cfd28740c26066de65690)

I have a doubt I have multiple price Cards I use firebase as my database how to send the price amount to backend when I click the button thanks in advance

[Anirudh Jwala](https://hashnode.com/@theJwala)

[Nov 12, 2022](https://hashnode.com/posts/razorpay-integration-in-react/60106855b5b03f4bf00e417e/comment/625cfd28740c26066de65690#reply-637001c2156201257c945d9f)

Hi Abdur, sorry this is really late reply. The ideal way is never send the price amount to backend. Rather send selected courseId by the user and fetch it's corresponding amount directly from the Collection snapshot

[Ayush Mukhopadhyay](https://hashnode.com/@ayushmukho)

[Jul 13, 2021](https://hashnode.com/posts/razorpay-integration-in-react/60106855b5b03f4bf00e417e/comment/60ed8c0d573c235ee63a33ca)

Nice One ❤

[Chandravardhan Singh](https://hashnode.com/@the_cvs)

[Jan 27, 2021](https://hashnode.com/posts/razorpay-integration-in-react/60106855b5b03f4bf00e417e/comment/60118398c497f64171a4dc4d)

Nice post.
