# Query payments Query payments within a specified date time range. These payments can be filtered by currency, minAmount, maxAmount, last4Digits & receivedEvents. The API returns data for payments processed after 25 June 2024. For payments processed before then use our query for historical payments. Endpoint: GET /paymentQueries/payments Version: 1 Security: BasicAuth ## Header parameters: - `Accept` (string, required) Example: "application/vnd.worldpay.payment-queries-v1.hal+json" ## Query parameters: - `startDate` (string, required) An ISO 8601 date-time supplied as a string. Filters for payments that occurred after the specified date-time. Must be supplied alongside endDate. Example: "2024-04-28T21:30:20Z" - `endDate` (string, required) An ISO 8601 date-time supplied as a string. Filters for payments that occurred below the specified date-time. Must be supplied alongside startDate. Example: "2024-05-31T21:30:20Z" - `pageSize` (integer) The maximum number of payments to be returned in the response (max 300). Example: 10 - `currency` (string) The three digit currency code. Example: "GBP" - `minAmount` (integer) This is a whole number including the currency exponent (e.g. GBP has an exponent of 2, so for £2.50 supply:250). - `maxAmount` (integer) This is a whole number including the currency exponent (e.g. GBP has an exponent of 2, so for £2.50 supply:250). Example: 1000 - `last4Digits` (string) The last four digits of the card number. Example: "1111" - `entityReferences` (string) Your entity reference(s). Example: "entityReference1,entityReference2" - `receivedEvents` (string) Name of the event. Example: "authorizationRequested, authorizationSucceeded" - `transactionReference` (string) A unique reference generated by you, used to identify a payment throughout its lifecycle. This shouldn't be used in conjunction with the above fields. Use it as a single parameter to query data. Example: "Memory265-13/08/1876" ## Response 200 fields (application/vnd.worldpay.payment-queries-v1.hal+json): - `_links` (object, required) links to the pages. - `_links.self` (object, required) Self link to the page. - `_links.self.href` (string) First page as per the pageSize. - `_links.next` (object) Next page link if the response contains more pages. - `_links.next.href` (string) Second page as per the pageSize. - `_embedded` (object, required) - `_embedded.payments` (array) Array of payments within the date range. - `_embedded.payments.timestamp` (string) Payment initial authorization time. - `_embedded.payments.paymentId` (string) Unique identifier generated by us for a single payment. Generated at authorization, and maintained through successive payment actions. Example: "pay4u_lHl2jobU5S1T2pWkq10" - `_embedded.payments.transactionReference` (string) A unique reference generated by you, used to identify a payment throughout its lifecycle. - `_embedded.payments.narrative` (object) An object that contains identification and further details of the merchant. - `_embedded.payments.narrative.line1` (string) First line of text that appears on your customer's statement. - `_embedded.payments.narrative.line2` (string) Second line of text that appears on your customer's statement. - `_embedded.payments.transactionType` (string) An object that contains transaction type. Enum: "oneTime", "cardOnFile", "recurring" - `_embedded.payments.authorizationType` (string) An object that contains authorization type. Enum: "authorization", "sale" - `_embedded.payments.entity` (string) Merchant entity name. - `_embedded.payments.lastEvent` (string) The last event received for the payment Enum: "authorizationRequested", "authorizationSucceeded", "authorizationRefused", "authorizationFailed", "authorizationTimedOut", "saleRequested", "saleSucceeded", "saleRefused", "saleFailed", "saleTimedOut", "settlementRequested", "settlementRequestSubmitted", "settlementFailed", "settlementTimedOut", "refundRequested", "refundRequestSubmitted", "refundFailed", "refundTimedOut", "cancellationRequested", "cancellationRequestSubmitted", "cancellationFailed", "cancellationTimedOut", "reversalRequested", "reversalRequestSubmitted", "reversalFailed", "reversalTimedOut" - `_embedded.payments.scheme` (object) An object containing information returned by the card scheme. - `_embedded.payments.scheme.reference` (string, required) The reference returned by the scheme for this particular payment authorization. Example: "MCCOLXT1C0104 " - `_embedded.payments.issuer` (object) An object containing information returned by the issuer. - `_embedded.payments.issuer.authorizationCode` (string, required) A code returned by the card issuer for a successful authorization. Used in reconciliation and dispute management. Example: "T31306" - `_embedded.payments.paymentInstrument` (object) The payment instrument supplied in the authorization request. - `_embedded.payments.paymentInstrument.type` (string) The type of payment instrument supplied in the authorization request. Enum: "card/plain", "card/network", "card/networkToken", "card/networkToken+applepay", "card/networkToken+googlepay", "card/plain+masked" - `_embedded.payments.paymentInstrument.card` (object) An object that contains information about the card used. - `_embedded.payments.paymentInstrument.card.number` (object) An object that contains information about the card number. - `_embedded.payments.paymentInstrument.card.number.cardBin` (string) The card BIN (Bank Identification Number) is the first 6 or 8 digits of the card number, and can be used to identify the card issuer, the card brand(s) (eg Visa, Cartes Bancaires), and the country. Card BINs are used to route transactions, check card capabilities, and in fraud assessments. Example: "444433" - `_embedded.payments.paymentInstrument.card.number.last4Digits` (string) The last four digits of the card. Some characters may be obfuscated with a * if the PAN length is less than 16 characters. Example: "1111" - `_embedded.payments.paymentInstrument.card.category` (string) Whether the card is classed as a consumer card or a card for commercial use. Enum: "commercial", "consumer" - `_embedded.payments.paymentInstrument.card.countryCode` (string) The [ISO 3166-1 Alpha-2 format](/products/reference/supported-countries-currencies#iso-country-codes) country code that the card was issued in. May return N/A where the country is unknown. Example: "GB" - `_embedded.payments.paymentInstrument.card.expiryDate` (object) The expiry date of the card or network token (where the supplied paymentInstrument was card/wallet+applepay, card/wallet+googlepay, card/networkToken, card/networkToken+applepay or card/networkToken+googlepay). - `_embedded.payments.paymentInstrument.card.expiryDate.month` (integer) - `_embedded.payments.paymentInstrument.card.expiryDate.year` (integer) - `_embedded.payments.paymentInstrument.card.issuerName` (string) The name of the card issuer. Example: "AN ISSUING BANK LTD" - `_embedded.payments.paymentInstrument.card.fundingType` (string) How the card is funded. Enum: "credit", "debit", "prepaid", "chargeCard", "deferredDebit" - `_embedded.payments.paymentInstrument.card.brand` (string) The card brand that the transaction was processed with. Sometimes referred to as the network or scheme. Example: "visa" - `_embedded.payments.paymentInstrument.card.paymentAccountReference` (string) The payment account reference (PAR) is a non-financial reference that uniquely identifies the underlying cardholder account. This allows you to correlate payments made from the same account with differing instruments (e.g. card/plain and card/wallet+applepay), where the same account funds the transaction. A PAR cannot be used to initiate a payment. Example: "Q1HJZ28RKA1EBL470G9XYG90R5D3E" - `_embedded.payments.value` (object) An object that contains payment amount and currency. - `_embedded.payments.value.amount` (integer, required) This is a whole number including the currency exponent (e.g. GBP has an exponent of 2, so for £2.50 supply:250). - `_embedded.payments.value.currency` (string, required) The 3 digit currency code. - `_embedded.payments._links` (object) link to retrieveByPaymentId. - `_embedded.payments._links.self` (object, required) Self link to retrieveByPaymentId. - `_embedded.payments._links.self.href` (string) RetrieveByPaymentId provides event history and next action links. ## Response 400 fields (application/vnd.worldpay.payment-queries-v1.hal+json): - `errorName` (string, required) The type of error. Example: "invalidPageSize" - `message` (string, required) A description of the error. Example: "Provided page size is not valid."