question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Success handler only returns "razorpay_payment_id" in live mode.

See original GitHub issue
const razorOptions = {
    "key": keyId,
    "amount": amount,
    "currency": "INR",
    "name":"test payment",
    "image": image,
    "order_id": orderId,
    "prefill": {
        "name": user.name,
        "email": user.email
    },
    "handler": function(res) {
        console.log(res); 
    },
    "modal": {
        "ondismiss": function () {
             window.location.href = "/events";
        }
    }
}

In Test Mode:

Success handler returns proper response fields as mentioned in razorpay doc.

But In Live Mode:

On successfuly payment (amount deducted from user’s bank account), succes handler returns only razorpay_payment_id, without razorpay_order_id, razorpay_signature

{ 
  created_at: 1643955638,
  razorpay_payment_id: "pay_SOME_ID",
  status: "captured",
  status_code: 200
}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:8
  • Comments:6

github_iconTop GitHub Comments

5reactions
monetreecommented, Feb 4, 2022

https://razorpay.com/docs/payments/payment-gateway/web-integration/standard/build-integration/#11-create-an-order-on-your-server

as per the doc it should return

"handler": function (response){ alert(response.razorpay_payment_id); alert(response.razorpay_order_id); alert(response.razorpay_signature) }

but it returns only. razorpay_payment_id

3reactions
paarthibankcommented, Feb 4, 2022

Hey I am also facing the same issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Payment Gateway | Standard Checkout - Build Integration
A successful payment returns the following fields to the Checkout form. ... string Unique identifier for the payment returned by Checkout only for...
Read more >
Razorpay says seller cannot accept payments in (Live mode)
Im trying to implement razor pay in live mode on a Django Project, on clicking pay button it shows availabe options to pay, ......
Read more >
Razorpay Payment Integration using Node.js - GeeksforGeeks
3. currency: Currency string of three characters. 4. Name: Name of company, it will be shown on UI modal. 5. order_id: Must be...
Read more >
Test mode success response object does not contain ... - GitHub
I am trying to make payment in the test mode and the payment is successfully made. However, I am receiving only razorpay_payment_id in...
Read more >
Not redirecting to confirmation page after payment is made
Your account has been charged and your transaction is successful. ... Returns key to use in session for storing Razorpay order Id *...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found