All amounts are in Indian Rupees (INR). The
amountInInr field takes whole-number rupee values (e.g. 185 for ₹185).Payment flow
Create a payment order
Call
ResponseSave the
POST /payments/order to create a Razorpay order on the server. The server returns an order ID and the metadata your client needs to open the Razorpay payment sheet.Request| Field | Type | Required | Description |
|---|---|---|---|
amountInInr | integer | Yes | Fare amount in INR. Must be greater than zero. |
rideSummary | string | No | Human-readable description shown on the payment sheet. |
paymentMode | string | No | Preferred payment method (e.g. UPI, CARD, NETBANKING, CASH). |
orderId and sessionId — you will need both in the next steps.Collect payment with the Razorpay SDK
Use the When the user completes payment, Razorpay calls your handler with
orderId, amount, currency, and keyId from the previous response to open the Razorpay checkout on your client. This step happens entirely in your frontend or mobile app using the Razorpay SDK.- JavaScript (web)
- React Native
razorpay_order_id, razorpay_payment_id, and razorpay_signature. Pass all three to the verification step.Verify the payment
Call
ResponseIf the signature is invalid, the server returns
POST /payments/verify with the three values returned by the Razorpay SDK. The server verifies the HMAC signature against your Razorpay secret key and confirms the payment is legitimate.Request| Field | Type | Required | Description |
|---|---|---|---|
orderId | string | Yes | The Razorpay order ID from POST /payments/order. |
paymentId | string | Yes | The razorpay_payment_id returned by the Razorpay SDK. |
signature | string | Yes | The razorpay_signature returned by the Razorpay SDK. |
paymentMode | string | No | The payment mode used (e.g. UPI, CARD). Used for recordkeeping on the ride. |
400 Bad Request. Do not mark the ride as paid if you receive an error response.Check session status
You can check the status of any payment session at any time using ResponseThe
GET /payments/session/{sessionId}. Use the sessionId returned by POST /payments/order.Requeststatus field reflects the current state of the payment session. Poll this endpoint if you need to reconcile payment state outside the main verification flow.The paymentMode field
The paymentMode field appears on both the ride object and on payment requests. It records how the rider chose to pay. You set it when creating the payment order and when verifying. Common values include UPI, CARD, NETBANKING, and CASH.
After a successful payment verification, the paymentMode and paymentReference fields on the ride object are updated automatically:
paymentReference field on the ride stores the Razorpay paymentId for audit and dispute purposes.