Skip to main content
The orders endpoints let you create Razorpay orders, inspect them, list historical orders, edit notes, fetch associated payments, and verify a payment signature against an order.

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: createRazorpayOrder
Client method: authClient.razorpay.createOrder(...)
integer
required
Amount in the smallest currency subunit. For INR the minimum is 100 (₹1.00).
string
default:"INR"
ISO 4217 currency code. Three characters.
string
Your internal receipt identifier. Maximum 40 characters.
object
Up to 15 key-value pairs. Each value must be 256 characters or fewer.
boolean
default:"false"
Whether partial payments are allowed.
integer
Minimum amount for the first partial payment. Required when partialPayment is true.
boolean
default:"true"
Whether Razorpay should auto-capture payments against this order.
string
Razorpay order id, for example order_XXXX.
integer
Amount in subunits.
string
Currency code.
string
Receipt identifier.
string
Order status, for example created.
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: getRazorpayOrder
Client method: authClient.razorpay.order({ query: { id } })
string
required
Razorpay order id.

List orders

GET /api/auth/razorpay/order/list Lists Razorpay orders with pagination and optional filters. Server API name: fetchAllOrders
Client method: authClient.razorpay.order.list({ query: { ... } })
integer
Unix timestamp. Return orders created after this time.
integer
Unix timestamp. Return orders created before this time.
integer
Maximum number of orders to return. Maximum value is 100.
integer
Number of orders to skip.
boolean
Filter by authorization status.
string
Filter by receipt identifier.
string
Comma-separated list of related resources to expand.
Errors: ORDER_LIST_FAILED.

Edit order

POST /api/auth/razorpay/order/edit Updates the notes on an existing Razorpay order. Server API name: editOrder
Client method: authClient.razorpay.order.edit(...)
string
required
Razorpay order id to update.
object
New notes object. Up to 15 key-value pairs, values 256 characters or fewer.
Errors: ORDER_EDIT_FAILED.

Order payments

GET /api/auth/razorpay/order/payments Fetches all payments associated with a given order. Server API name: fetchPaymentsForOrder
Client method: authClient.razorpay.order.payments({ query: { orderId } })
string
required
Razorpay order id.
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: verifyRazorpayPayment
Client method: authClient.razorpay.verifyPayment(...)
string
required
Razorpay order id returned by Checkout.
string
required
Razorpay payment id returned by Checkout.
string
required
Signature string returned by Checkout.
integer
Optional. If provided, the endpoint also checks that the captured amount matches.
boolean
true only when the signature is valid, the payment is captured, the order matches, and the expected amount (if given) matches.
string
Razorpay payment status, for example captured.
number
Captured amount in subunits.
string
Currency code.
string | null
The order id associated with the payment.
string
Present when valid is false. One of invalid_signature, order_mismatch, amount_mismatch, payment_not_captured.
Do not rely on client-side verification alone to fulfill orders. Always confirm payment on the order.paid webhook handler (onOrderPaid) before delivering goods or services.
Errors: INVALID_PAYMENT_SIGNATURE (bad signature), PAYMENT_FETCH_FAILED (unable to fetch payment from Razorpay).