Orders

The following section will explain the order entity and their associated API

Order Entity#

The order entity consists of the following fields:

id string
The order id of this particular order.
amount integer
The amount (in paisa) that this order was created for.
currency string
The currency associated with this order's amount. Refer the list of supported currencies.
attempts integer
The number of payment attempts that have been made against this order.
status string
This order's status in the Order life cycle.
receipt string
Your receipt id corresponding to this order. Maximum length 40 chars.
payment_capture boolean
Flag for auto capturing the payment.
created_at timestamp
The timestamp corresponding to this order's creation time.
notes object
Object consisting of notes passed while creating an order Entity.

Notes:
Once a successful payment is captured by you, the order status will advance to paid. The order status will continue to remain attempted in the mean while. However no more payments can be made against this order.

Create an Order#

The following endpoint creates an order:

/orders

Request Parameters#

Following are the parameters that can be passed:

amount required
Amount for the order in paisa. Payment can only be made for this amount against the order.
currency required
INR is the only supported currency currently.
receipt required
Your receipt id for this order should be passed in here. Maximum length 40 characters.
payment_capture optional
Payment capture flag for auto capturing payment.
notes optional
Object consisting of key value pairs as notes. To read more, refer Notes.

Below are sample requests for creating an order:

Fetch Orders#

The following end point retrieves the details of a particular order:

/orders

Request Parameters#

from optional
Timestamp from when orders are to be fetched
to optional
Timestamp up till when orders are to be fetched
count optional
Count of orders to be fetched. Default Count is 10
skip optional
Numbers of orders to be skipped. Default Skip is 0
authorized optional
Orders for which payments are currently in authorized state.
receipt optional
Orders with the provided value for receipt

Fetch an Order with Id#

The following endpoint retrieves the order details of a particular order:

/orders/:id

Request Parameters#

id required
Id of order to be fetched.

Update the Order#

You can modify an existing Order to update the Notes field only. Notes can be used to record additional information about the Order. You can add up to 15 key-value pairs with each value of the key not exceeding 256 characters.

Using the PATCH operation, you can replace the entire notes object for the entity.

Request Parameters#

To modify the Notes field in a particular Order, construct the API request as follows:

/orders/:id/
id required
ID of the order in which the Notes field to be updated
notes required
Notes of the entity to be modified
Curl
Java
Python
PHP
.NET
Ruby