Skip to main content
Use this endpoint to retrieve the details of all the orders you created. In this example, count and skip query parameters have been used. You can invoke this API without these query parameters as well.

Request

Curl

Response

Success

Parameters

authorizedoptional : integer Possible values:
  • 1 : Retrieves Orders for which payments have been authorized. Payment and order states differ. Know more about payment states.
  • 0 : Retrieves orders for which payments have not been authorized.
receiptoptional : string Retrieves the orders that contain the provided value for receipt. fromoptional : integer Timestamp (in Unix format) from when the orders should be fetched. tooptional : integer Timestamp (in Unix format) up till when orders are to be fetched. countoptional : integer The number of orders to be fetched. The default value is 10. The maximum value is 100. This can be used for pagination, in combination with skip. skipoptional : integer The number of orders to be skipped. The default value is 0. This can be used for pagination, in combination with count. expand[]optional : array Used to retrieve additional information about the payment. Using this parameter will cause a sub-entity to be added to the response. Supported values are:- payments: Returns a collection of all payments made for each order.
  • payments.card: Returns the card details of each payment made for each order.
  • transfers: Returns a collection of transfers created for each order. For more information about creating transfers using orders, refer to the Route section of the Route API documentation.
  • virtual_account: Returns the virtual account details created for each order. For more information about creating Virtual Accounts, refer to the Smart Collect API

Parameters

id : string The unique identifier of the order. amount : integer The amount for which the order was created, in currency subunits. For example, for an amount of , enter 29500. entity : string Name of the entity. Here, it is order. amount_paid : integer The amount paid against the order. amount_due : integer The amount pending against the order. currency mandatory : string ISO code for the currency in which you want to accept the payment. The default length is 3 characters. Refer to the list of supported currencies. receipt : string Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique. status : string The status of the order. Possible values:
  • created: When you create an order it is in the created state. It stays in this state till a payment is attempted on it.
  • attempted: An order moves from created to attempted state when a payment is first attempted on it. It remains in the attempted state till one payment associated with that order is captured.
  • paid: After the successful capture of the payment, the order moves to the paid state. No further payment requests are permitted once the order moves to the paid state. The order stays in the paid state even if the payment associated with the order is refunded.
attempts : integer The number of payment attempts, successful and failed, that have been made against this order. notes : json object Key-value pair that can be 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”. created_at : integer Indicates the Unix timestamp when this order was created.

Errors

The API “ provided is invalid.
  • code: 400
  • description: The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons: - Different keys for test mode and live modes.
  • Expired API key.
  • solution: The API keys must be active and entered correctly with no whitespace before or after the keys.