Skip to content

fix: create razorpay order when order_id is not a razorpay id#230

Open
ravibharathi656 wants to merge 1 commit into
frappe:developfrom
aerele:fix-razorpay-order-creation
Open

fix: create razorpay order when order_id is not a razorpay id#230
ravibharathi656 wants to merge 1 commit into
frappe:developfrom
aerele:fix-razorpay-order-creation

Conversation

@ravibharathi656

@ravibharathi656 ravibharathi656 commented Jun 9, 2026

Copy link
Copy Markdown
Member

Issue: Razorpay Checkout fails with a 400 error when paying system passes the Payment Request name (e.g. ACC-PRQ-2026-00003) as order_id, which is not a valid Razorpay order id. get_payment_url only created a Razorpay order when order_id was empty, so for the Payment Request flow no real order was ever created. After the checkout template started sending order_id as a top-level option, Razorpay validates it against the Orders API and rejects the invalid id, returning a 400 and breaking checkout.

This creates a real order via the Orders API whenever the provided value is not a Razorpay order id (order_...), keeping the caller's original reference as the order receipt.

Ref: #70591

Backport needed: v16, v15

@ravibharathi656 ravibharathi656 force-pushed the fix-razorpay-order-creation branch from 301b66d to 6278da8 Compare June 9, 2026 06:45
@ravibharathi656 ravibharathi656 marked this pull request as ready for review June 9, 2026 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant