API ReferenceIntegrationsKnowledge Base

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 for which the Order was created.
currency
string The currency associated with the 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 The status of the Order.
Possible values:
- created
- attempted
- paid Notes:
An Order moves from created to attempted state when a payment request is first made on that Order. It remains in the attempted state till any payment associated with that Order is captured. After the successful capture of the payment, Order moves to the paid state. No further payment requests are permitted after the Order attains the paid state.
receipt
string Your receipt id corresponding to this order. Maximum length 40 chars.
payment_capture
boolean Flag for auto capturing the payment.
created_at
integer The timestamp corresponding to this order's creation time.
notes
dictionary Object consisting of notes passed while creating an order Entity.

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 endpoint retrieves the details of all orders created by you:

/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

Fetch Payments for an Order#

You can retrieve all the payments made for an Order. The response contains multiple payment attempts, authorized and failed, for that Order.

/orders/:id/payments

Path Parameters#

id mandatory
string Unique identifier of the order for which the payments should be retrieved.
Curl
Java
Python
PHP
.NET
Ruby