Orders Guide

Orders API is the more powerful integration method available today with a bunch of extra advantages over the standard integration method.

Advantages of Orders API#

Orders API brings in additional benefits to the merchants:

  • Single successful payment bound to an order. Prevents multiple payments
  • Capture of the payments immediately after authorization. Auto capture of payments
  • Quick and easy query in the database. Combines multiple payment attempts for a single order

Use cases#

Here are some of the use cases of Razorpay Orders:

  • Creating an order_id against every order created in your system.
    For every unique order created in your server, Razorpay creates a corresponding order_id, which is utilized for initiating a payment pertaining to that particular order.

  • Combining all attempts made for an order, thereby making it easier to query our systems for the order.
    If there are multiple payment attempts made against an order, Razorpay ties all the attempts to a single order_id that can later be used to query the Razorpay system. Furthermore, it also ensures that only the payment that gets authorized is processed and any other unprocessed payment is refunded to the customer by Razorpay.

  • Authenticate a payment using Payment Verification.
    Orders API allows you to verify the authenticity and success of a payment at the end of the payment process.

Orders Workflow#

  1. Customer places an order on your website or app.
  2. Your server sends a create order request to Razorpay's server.
  3. In the response, Razorpay returns an order_id. You need to store this order_id in your database corresponding to the order on your end.
  4. Submit the order_id to the Checkout form on the website or app.
  5. In the Checkout, the customer enters the payment details.
  6. After the successful payment on the Checkout, send the following attributes to your server:
    • razorpay_payment_id
    • razorpay_order_id
    • razorpay_signature
  7. The details submitted in the Checkout are verified in your server.
  8. After successful verification at your end, you can now capture the payment.