# Query historical payments Query payments processed before 25 June 2024. Provide a transactionReference and entityReference for a payment to find the matching payment in the archive. Endpoint: GET /paymentQueries/archivedPayments Version: 1 Security: BasicAuth ## Header parameters: - `Accept` (string, required) Example: "application/vnd.worldpay.payment-queries-v1.hal+json" ## Query parameters: - `transactionReference` (string, required) A unique reference generated by you, used to identify a payment throughout its lifecycle. Example: "89197aeb-c94a-456e-8014-1272fbcb64eb" - `entityReference` (string, required) A merchant entity. Example: "default" ## Response 200 fields (application/vnd.worldpay.payment-queries-v1.hal+json): - `_links` (object, required) Self link and next action links.The Next action links are dependent on the lastEvent, refer to 'query for historical payments Response' section for more details. - `_links.self` (object, required) Self link to the page. - `_links.self.href` (string) Self link to the page. - `_links.payments:cancel` (object) Next action links. - `_links.payments:cancel.href` (string) Next action links. - `_links.payments:settle` (object) Next action links. - `_links.payments:partialSettle` (object) Next action links. - `_embedded` (object, required) - `_embedded.payments` (array) Array of payments. - `_embedded.payments.lastEvent` (string) The last event of a payment. Possible event values are:AuthorizedRefusedSent for CancellationSent for RefundSent for SettlementUnknown - `_embedded.payments.paymentInstrument` (object) An object that contains information about the payment type. - `_embedded.payments.paymentInstrument.type` (string) An object that contains information about the payment type. 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.last4Digits` (string) last4Digits of the card number used. - `_embedded.payments.paymentInstrument.card.brand` (object) An object that contains information about the brand. The brand values can be Visa, Mastercard etc. - `_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. ## Response 400 fields (application/vnd.worldpay.payment-queries-v1.hal+json): - `errorName` (string, required) The type of error. Example: "entityIsNotConfigured" - `message` (string, required) A description of the error Example: "Entity is not configured to use this resource"