Create order
POST /api/auth/razorpay/create-order
Creates a new Razorpay order. The returned order id is used with Razorpay Checkout on the frontend.
Server API name: createRazorpayOrderClient method:
authClient.razorpay.createOrder(...)
If
amount is below the minimum for the currency, the endpoint returns INVALID_ORDER_AMOUNT.Get order
GET /api/auth/razorpay/order
Retrieves a single Razorpay order by id.
Server API name: getRazorpayOrderClient method:
authClient.razorpay.order({ query: { id } })
List orders
GET /api/auth/razorpay/order/list
Lists Razorpay orders with pagination and optional filters.
Server API name: fetchAllOrdersClient method:
authClient.razorpay.order.list({ query: { ... } })
Errors:
ORDER_LIST_FAILED.Edit order
POST /api/auth/razorpay/order/edit
Updates the notes on an existing Razorpay order.
Server API name: editOrderClient method:
authClient.razorpay.order.edit(...)
Errors:
ORDER_EDIT_FAILED.Order payments
GET /api/auth/razorpay/order/payments
Fetches all payments associated with a given order.
Server API name: fetchPaymentsForOrderClient method:
authClient.razorpay.order.payments({ query: { orderId } })
Errors:
ORDER_PAYMENTS_FETCH_FAILED.Verify payment
POST /api/auth/razorpay/verify-payment
Verifies the Razorpay payment signature and checks that the payment is captured and matches the expected order and amount. This is typically called after the customer completes Checkout and your frontend receives razorpay_order_id, razorpay_payment_id, and razorpay_signature.
Server API name: verifyRazorpayPaymentClient method:
authClient.razorpay.verifyPayment(...)
true only when the signature is valid, the payment is captured, the order matches, and the expected amount (if given) matches.Present when
valid is false. One of invalid_signature, order_mismatch, amount_mismatch, payment_not_captured.Errors:
INVALID_PAYMENT_SIGNATURE (bad signature), PAYMENT_FETCH_FAILED (unable to fetch payment from Razorpay).