Order is an important step in the payment process.
- An order should be created for every payment.
- You can create an order using the . It is a server-side API call. Know how to Orders API.
- The
order_id
received in the response should be passed to the checkout. This ties the Order with the payment and secures the request from being tampered.
Know more about
.Handy Tips
You can capture payments automatically with the
on the Razorpay Dashboard.In the sample app, the rubysample.rb file contains the code for order creation using Orders API.
Here is the list of request parameters for creating the order:
amount
mandatory
integer
The transaction amount, expressed in the currency subunit. For example, for an actual amount of ₹299.35, the value of this field should be 29935
.
currency
mandatory
string
The currency in which the transaction should be made. See the
receipt
optional
string
Pass the receipt id created for this order. Maximum length is 40 characters.
notes
optional
json object
Optional notes for order. Key-value pair used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”
.
partial_payment
optional
boolean
Indicates whether the customer can make a partial payment. Possible values:
true
: Yes, the customer can make partial payments.false
(default): No, the customer cannot make partial payments.
Descriptions for the response parameters are present in the
parameters table.The error response parameters are available in the
.