Menu

Getting details of lists of orders

Getting details of lists of orders

Example Request

Copied!
curl https://api.worldpay.com/v1/orders?environment={environment}
&fromDate={fromDate}&toDate={toDate}&paymentStatus={paymentStatus}
&orderCode={orderCode}&customerOrderCode={customerOrderCode}
&cardNumber={cardNumber}&sortDirection={sortDirection}&sortProperty=
{sortProperty}&pageNumber={number}&csv=true/false&csvLimit={csvLimit}

-H "Authorization:your-service-key"
-H "Content-type: application/json" 
-X GET

Example Response

Copied!
{
   "currentPageNumber":1,
   "totalPages":1,
   "numberOfElements":1,
   "orders":[{
      "token": "your-token",
      "orderDescription": "your-order-description",
      "netAmount": 500,
      "authorizedAmount":99
      "commission": 10,
      "chargedbackAmount": 500,
      "currencyCode":"GBP",
      "currencyCodeExponent": 2,
      "settlementCurrency": "GBP",
      "is3DSOrder":true/false,
      "authorizeOnly":true/false,
      "settlementCurrencyExponent": 2,
      "creationDate": "2014-05-07T09:26:27.658+0000",
      "modificationDate": "2014-05-26T07:16:45.658+0000",
      "orderCode": "worldpay-order-code",
      "amount": 500,
      "currencyCode": "GBP",
      "paymentStatus": "SUCCESS",
      "paymentStatusReason": "reason",
      "paymentResponse": {
           "name": "name",
           "expiryMonth": 2,
           "expiryYear": 2015,
           "issueNumber": 2,
           "startMonth": 8,
           "startYear": 2013,
           "cardType": "VISA_CREDIT",
           "maskedCardNumber": "  ** 1111",
           "billingAddress": {
                "address1": "address1",
                "address2": "address2",
                "address3": "address3",
                "postalCode": "postCode",
                "city": "Reading",
                "state": "Berkshire",
                "countryCode": "GB"
           }
      },
      "customerOrderCode": "my-order-number",
      "customerIdentifiers": {
          "key1": "value1",
          "key2": "value2",
          "key3": "value3",
          "key4": "value4",
          "key5": "value5"
      },
      "environment": "TEST",
      "history": [
          {
              "modificationDate": "2014-05-07T09:26:27.658+0000",
              "state": "SUCCESS",
              "amount": 500,
              "currencyCode": "GBP",
              "currencyCodeExponent": 2
          },
         {
              "modificationDate": "2014-05-11T11:56:45.658+0000",
              "state": "SETTLED",
              "amount": 500,
              "currencyCode": "GBP",
              "currencyCodeExponent": 2,
              "netAmount": 490,
              "commission": 10,
              "settlementCurrency": "GBP",
              "settlementCurrencyExponent": 2
          }
       ]
    }
  ]
}

Details of a set of orders can be obtained by sending a GET request.

Query parameters

environmentString, Mandatory
"TEST" or "LIVE" depending on whether you want to retrieve Test or Live orders
fromDateString, Mandatory
Start of the date range you want to retrieve orders for as yyyy-mm-dd, e.g. "2015-03-27"
toDateString, Mandatory
End of the date range you want to retrieve orders for as yyyy-mm-dd, e.g. "2015-04-27"
paymentStatusString, Optional
State of the orders you want to retrieve. For a full last of paymentStatuses see the Orders Introduction section
orderCodeString, Optional
Orders with partially or fully matched order codes will be returned in the response
customerOrderCodeString, Optional
Orders with partially or fully matched customer order codes will be returned in the response
cardNumberString, Optional
Orders with partially with partially or fully matched last 4 digits of a card number will be returned in the response
sortDirectionString, Optional
"asc" or "desc" depending on whether you want the list of orders to be sorted in ascending or descending order. Default is descending
sortPropertyString, Optional
"CREATE_DATE" or "MODIFICATION_DATE". Default is MODIFICATION_DATE which is the date at which the state of this order was last modified
pageNumberString, Optional
Get Orders will only return 20 orders per page. This field allows you to specify which page you want to retrieve. Note: the first page is page 0
csvString, Optional
true or false depending on whether you want to receive the results as a Comma Separated Values (CSV) file or not. The default is false. CSV files can be used to import data into Microsoft Excel
csvLimitString, Optional
Maximum number of records to be returned in a CSV file