razorpay / razorpay/razorpay-node
PAYMENT MODAL IS NOT OPENIN G
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 243
- Forks
- 128
- PR merge metrics
- No merged PRs in 30d
Description
Steps to reproduce the behavior
After running the code, a button will be shown.
After clicking the button, a checkout modal should be opened
Expected behavior
A payment modal is not opening saying
Oops something went wrong
Error in opening checkout
Actual behavior
A checkout modal should be opened.
Code snippets
Run this code
<html>
<body>
<button id="rzp-button">Authenticate</button>
<script src="https://checkout.razorpay.com/v1/checkout.js"></script>
<script>
var options = {
"key": [my_key]",
"subscription_id": [my_subscription_id],
"recurring": true,
"name": "My Billing Label",
"description": "Auth txn for sub_00000000000001",
"handler": function (response){
alert(response.razorpay_payment_id);
}
};
var rzp1 = new Razorpay(options);
document.getElementById('rzp-button').onclick = function(e){
rzp1.open();
}
</script>
</body>
</html>
This is Err is coming in console
{
"error": {
"code": "BAD_REQUEST_ERROR",
"description": "Invalid request payload",
"step": "NA",
"reason": "NA",
"source": "NA"
}
}
if I didn't use use subscription_id parameter, it had not given any Err, and even checkout be opened
Node version
v18.14.1
Library version
https://checkout.razorpay.com/v1/checkout.js
Additional Information
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the provided HTML snippet with the hosted checkout.js entry point, including subscription_id, and inspect the browser console response. Done means the checkout modal opens successfully with the subscription-based configuration without the BAD_REQUEST_ERROR.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, payments
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100