{"templateId":"markdown","versions":[{"version":"v1","label":"v1","link":"/products/payment-queries/query-archive","default":true,"active":true,"folderId":"f48383ec"}],"sharedDataIds":{"sidebar":"sidebar-products/payment-queries/sidebars.yaml","current-catalog-info":"current-catalog-info-/products/payment-queries/openapi"},"props":{"metadata":{"markdoc":{"tagList":["partial","admonition","json-schema","tabs","tab","code-snippet"]},"custom_product":"Payment Queries","type":"markdown"},"seo":{"title":"Query historical payments","description":"Worldpay for Developers - docs, code examples, resources and tools. Everything you need to build your omnichannel payment solution.","siteUrl":"https://docs.worldpay.com/access","image":"/access/assets/worldpay-logo-light.21b7daf79984773a9fcd7d4fbcb07ae5289dfffd6023c4c3dca720c7058e53dc.33f780a6.svg","keywords":"documentation, api, openapi, sdks, developer, payments, json, payouts, 3ds","jsonLd":{"@context":"https://schema.org","@type":"Organization","url":"https://docs.worldpay.com/access","name":"Worldpay"},"meta":[{"name":"google-site-verification","content":"zjziIKaP3ImsqsfhYnEBnq1R85UabiSwl7HTXuwtZuo"},{"name":"doc_product","content":"Access"},{"name":"doc_category","content":"Documentation"}],"llmstxt":{"hide":false,"sections":[{"title":"Payments API","description":"Payment orchestration API combining fraud assessment, 3ds authentication, SCA exemptions, Worldpay Token creation and a card or wallet based payment.","includeFiles":["products/payments/@20240601/**/*"],"excludeFiles":[]},{"title":"Payment Queries API","description":"Querying your payments data, based on a variety of parameters.","includeFiles":["products/payment-queries/@v1/**/*"],"excludeFiles":[]},{"title":"Card BIN Data API","description":"Provides detailed information about a card.","includeFiles":["products/card-bin/@v1/**/*"],"excludeFiles":[]},{"title":"3DS Authentication API","description":"Request 3DS authentication to protect against fraud, be SCA compliant and to shift liability using this standalone API.","includeFiles":["products/3ds/@v3/**/*"],"excludeFiles":[]},{"title":"FraudSight API","description":"Request a risk assessment and receive a response with an outcome (e.g. lowRisk) using this standalone API.","includeFiles":["products/fraudsight/@v1/**/*"],"excludeFiles":[]},{"title":"Checkout SDK","description":"Integrate using our clientside SDKs for both web and native devices. Benefit from SAQ-A/PCI-SSF compliance.","includeFiles":["products/checkout/web/@v2/**/*","products/checkout/ios/@v4/**/*","products/checkout/android/@v4/**/*","products/checkout/react-native/@v3/**/*","products/checkout/flutter/@v1/**/*"],"excludeFiles":[]},{"title":"Tokens API","description":"Minimizes the exposure of sensitive card details and increases the security of your customer's card details.","includeFiles":["products/tokens/@v3/**/*"],"excludeFiles":[]},{"title":"Card Payments API","description":"Request a card payment using this standalone API, requires separate requests for 3DS, Fraud assessment etc.","includeFiles":["products/card-payments/@v7/**/*"],"excludeFiles":[]},{"title":"Card Verifications API","description":"Verify your customer's card to maximize your authentication rates.","includeFiles":["products/card-verifications/@v6/**/*"],"excludeFiles":[]},{"title":"Account Payouts API","description":"Send funds to your customer's bank accounts and search for payouts using parameters.","includeFiles":["products/account-payouts/@20250101/**/*"],"excludeFiles":[]},{"title":"APMs","description":"Pay using eWallets, bank transfers, direct debits, local card schemes, Postpay and eInvoice/ Buy Now Pay Later.","includeFiles":["products/apms/@20240701/**/*"],"excludeFiles":[]},{"title":"Balance API","description":"Request your account details for a single account or all accounts under an entity.","includeFiles":["products/balance/@20250101/**/*"],"excludeFiles":[]},{"title":"Card Payouts API","description":"Send funds to your customer's cards.","includeFiles":["products/card-payouts/@v4/**/*"],"excludeFiles":[]},{"title":"Events (Webhooks)","description":"Receive status updates from Access Worldpay by setting up a webhook.","includeFiles":["products/events/@v1/**/*"],"excludeFiles":[]},{"title":"FX API","description":"Manage Foreign Exchange (FX) on your payments.","includeFiles":["products/fx/@v1/**/*"],"excludeFiles":[]},{"title":"Hosted Payment Pages (HPP) API","description":"Our low-code option to take payments securely at the lowest PCI compliance level - SAQ A.","includeFiles":["products/hosted-payment-pages/@v1/**/*"],"excludeFiles":[]},{"title":"Money Transfers API","description":"Money Transfer OCTs (Original Credit Transaction) allow funds to be pushed to an eligible card in 30 minutes or less.","includeFiles":["products/money-transfers/@v1/**/*"],"excludeFiles":[]},{"title":"Parties API","description":"Create parties, manage your payout instruments and beneficial owners and carry out identity verification checks.","includeFiles":["products/parties/@20250101/**/*"],"excludeFiles":[]},{"title":"SCA Exemptions API","description":"Maximize a frictionless checkout experience by using issuer data insights to apply exemptions.","includeFiles":["products/sca-exemptions/@v1/**/*"],"excludeFiles":[]},{"title":"Split Payments API","description":"Divide funds from a single payment amongst yourself and your parties/sellers.","includeFiles":["products/split-payments/@20250625/**/*"],"excludeFiles":[]},{"title":"Statements API","description":"Retrieve your account statement and see individual entries for all credits and debits.","includeFiles":["products/statements/@20250101/**/*"],"excludeFiles":[]},{"title":"Transfers API","description":"Transfer funds from source account to target account.","includeFiles":["products/transfers/@20250101/**/*"],"excludeFiles":[]},{"title":"Verified Tokens API","description":"Verified Tokens ensures that your customer's payment details are valid and CIT compliant when creating a token.","includeFiles":["products/verified-tokens/@v3/**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":["openapi"],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Last updated"]},": 17 October 2025 | ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/payment-queries/changelog/"},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Change log"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"query-historical-payments","__idx":0},"children":["Query historical payments"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Query card payments processed before 25 June 2024."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"request","__idx":1},"children":["Request"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Provide a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionReference"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["entityReference"]}," to find the matching payment."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://try.access.worldpay.com/paymentQueries/archivedPayments?transactionReference={transactionReference}&entityReference={entityReference}"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example","__idx":2},"children":["Example"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://try.access.worldpay.com/paymentQueries/archivedPayments?transactionReference=PayFac20230302-3charState&entity=entityReference123"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"parameter-descriptions","__idx":3},"children":["Parameter descriptions"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionReference"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["✅"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["unique"]}," reference generated by you. It is used to identify a payment throughout its lifecycle."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["entityReference"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["✅"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Direct your payment to assist with billing, reporting and reconciliation. This is mandatory for authentication of a payment.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Contact your Worldpay Implementation Manager for more details. ",{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note"},"children":[" You might have supplied this as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["entity"]}," in your original payment request. "]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The response contains summary information about the payment associated with the request parameters."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"response","__idx":4},"children":["Response"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"response-schema","__idx":5},"children":["Response schema"]},{"$$mdtype":"Tag","name":"JsonSchema","attributes":{"schema":{"$ref":"openapi.yaml#/components/schemas/pq_queryhistoricalpayments_200_response"},"options":{"schemaExpansionLevel":0},"schemaResolved":{"openapi":"3.1.0","components":{"schemas":{"__root":{"$ref":"#/components/schemas/pq_queryhistoricalpayments_200_response"},"fpanLastFour":{"pattern":"^[0-9]+$","type":"string","minLength":4,"maxLength":4,"example":"1111","description":"{% admonition type=\"warning\" name=\"Coming soon\" %}Preview only. Not yet available in production.{% /admonition %}\nThe last four digits of the actual card, where this was submitted in an authorization request that used a network token or a [mobile wallet](/products/wallets#submitting-card-metadata-to-worldpay) (encrypted or decrypted) `paymentInstrument`. Commonly referred to as the Funding Primary Account Number (FPAN)."},"paymentInstrument":{"type":"object","description":"An object that contains information about the payment type.","properties":{"type":{"enum":["card/plain","card/token","card/checkout","card/wallet+applepay","card/wallet+googlepay","card/networkToken","card/networkToken+applepay","card/networkToken+googlepay","card/network","card/plain+masked","card/network+masked"],"type":"string","description":"The type of payment instrument used for this payment."},"card":{"type":"object","description":"An object that contains information about the card used.","properties":{"number":{"type":"object","description":"An object that contains information about the card number.","properties":{"cardBin":{"pattern":"^[0-9*]+$","type":"string","description":"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) (e.g. Visa, Cartes Bancaires), and the country. Card BINs are used to route transactions, check card capabilities, and in fraud assessments.","example":"444433"},"last4Digits":{"pattern":"^[0-9*]+$","type":"string","description":"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"},"fpanLastFour":{"$ref":"#/components/schemas/fpanLastFour"}}},"category":{"type":"string","description":"Whether the card is classed as a consumer card or a card for commercial use.","enum":["commercial","consumer"]},"countryCode":{"maxLength":2,"minLength":2,"pattern":"^[A-Z]+$","type":"string","description":"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"},"expiryDate":{"type":"object","description":"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`).","properties":{"month":{"type":"integer"},"year":{"type":"integer"}}},"issuerName":{"type":"string","description":"The name of the card issuer.","example":"AN ISSUING BANK LTD"},"fundingType":{"type":"string","description":"How the card is funded.","enum":["credit","debit","prepaid","chargeCard","deferredDebit"]},"brand":{"type":"string","description":"The card brand that the transaction was processed with. Sometimes referred to as the network or scheme.","example":"visa"},"paymentAccountReference":{"type":"string","description":"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"}}}}},"pq_queryhistoricalpayments_200_response":{"required":["_links","_embedded"],"type":"object","properties":{"_links":{"required":["self"],"type":"object","description":"Self link and next action links. The next action links are dependent on the lastEvent. Refer to the 'query for historical payments response' section for more details.","properties":{"self":{"type":"object","description":"Self link to the page.","properties":{"href":{"type":"string","description":"Self link to the page."}}},"payments:cancel":{"type":"object","description":"Next action links.","properties":{"href":{"type":"string","description":"Next action links."}}},"payments:settle":{"type":"object","description":"Next action links.","properties":{"href":{"type":"string","description":"Next action links."}}},"payments:partialSettle":{"type":"object","description":"Next action links.","properties":{"href":{"type":"string","description":"Next action links."}}}}},"_embedded":{"type":"object","properties":{"payments":{"type":"array","description":"Array of payments.","items":{"type":"object","properties":{"lastEvent":{"type":"string","description":"The last event of a payment. Possible event values are:<ul><li>`Authorized`</li><li>`Refused`</li><li>`Sent for Cancellation`</li><li>`Sent for Refund`</li><li>`Sent for Settlement`</li><li>`Unknown`</li></ul>"},"paymentInstrument":{"$ref":"#/components/schemas/paymentInstrument"},"value":{"required":["amount","currency"],"type":"object","description":"An object that contains payment amount and currency.","properties":{"amount":{"type":"integer","description":"This is a whole number including the currency exponent (e.g. GBP has an exponent of 2, so for £2.50 supply:`250`)."},"currency":{"type":"string","description":"The 3 digit currency code."}}}}}}}}}}}}},"schemaResolvedErrors":[]},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"response-examples","__idx":6},"children":["Response examples"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Authorized","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"./code/responses/transactionRefEntityAuth.json","language":"json","header":{"controls":{"copy":{}}},"lang":"json","source":"{\r\n    \"_embedded\": {\r\n        \"payments\": [\r\n            {\r\n                \"lastEvent\": \"Authorized\",\r\n                \"value\": {\r\n                    \"amount\": 500,\r\n                    \"currency\": \"GBP\"\r\n                },\r\n                \"paymentInstrument\": {\r\n                    \"type\": \"card/plain\",\r\n                    \"card\": {\r\n                        \"number\": {\r\n                            \"last4Digits\": \"1111\"\r\n                        },\r\n                        \"brand\": \"visa\"\r\n                    }\r\n                },\r\n                \"_links\": {\r\n                    \"payments:cancel\": {\r\n                        \"href\": \"https://try.access.worldpay.com/payments/authorizations/cancellations/eyJrIjoiazNhYjYzMiIsImxpbmtWZXJzaW9uIjoiNS4wLjAifQ==.sN:g8wd64bwkbrp0md+bPxcanBnk2zLdsIqSa1pR99GeDrCwEtsymFb5gQw9WlrStDTK3eIWPy93y:7njc4649JSrU7+vFDl1J36+cwOkX0lW4Z+fnZKMutoUGX3m1:miQ42Na870582T9ERg+1ZUryhkE+qW88hu1DdDl2T76sf:VXab5cMYWO6LS0UzlfoW8PkXm9A8Gx:X:2vAwKFXFzKnt23AOHd1MAcGi2rYDmNWql5dV+zBj9zyT7GZXrLmjasoJJfxtEasqXGr:dzHa6q9jMukzvEX+SLmppl6itAGDMxqvmBKsIqEipLj126\"\r\n                    },\r\n                    \"payments:settle\": {\r\n                        \"href\": \"https://try.access.worldpay.com/payments/settlements/full/eyJrIjoiazNhYjYzMiIsImxpbmtWZXJzaW9uIjoiNS4wLjAifQ==.sN:g8wd64bwkbrp0md+bPxcanBnk2zLdsIqSa1pR99GeDrCwEtsymFb5gQw9WlrStDTK3eIWPy93y:7njc4649JSrU7+vFDl1J36+cwOkX0lW4Z+fnZKMutoUGX3m1:miQ42Na870582T9ERg+1ZUryhkE+qW88hu1DdDl2T76sf:VXab5cMYWO6LS0UzlfoW8PkXm9A8Gx:X:2vAwKFXFzKnt23AOHd1MAcGi2rYDmNWql5dV+zBj9zyT7GZXrLmjasoJJfxtEasqXGr:dzHa6q9jMukzvEX+SLmppl6itAGDMxqvmBKsIqEipLj126\"\r\n                    },\r\n                    \"payments:partialSettle\": {\r\n                        \"href\": \"https://try.access.worldpay.com/payments/settlements/partials/eyJrIjoiazNhYjYzMiIsImxpbmtWZXJzaW9uIjoiNS4wLjAifQ==.sN:g8wd64bwkbrp0md+bPxcanBnk2zLdsIqSa1pR99GeDrCwEtsymFb5gQw9WlrStDTK3eIWPy93y:7njc4649JSrU7+vFDl1J36+cwOkX0lW4Z+fnZKMutoUGX3m1:miQ42Na870582T9ERg+1ZUryhkE+qW88hu1DdDl2T76sf:VXab5cMYWO6LS0UzlfoW8PkXm9A8Gx:X:2vAwKFXFzKnt23AOHd1MAcGi2rYDmNWql5dV+zBj9zyT7GZXrLmjasoJJfxtEasqXGr:dzHa6q9jMukzvEX+SLmppl6itAGDMxqvmBKsIqEipLj126\"\r\n                    }\r\n                }\r\n            }\r\n        ]\r\n    },\r\n    \"_links\": {\r\n        \"self\": {\r\n            \"href\": \"/paymentQueries/archivedPayments?entityReference=AccessWP&transactionReference=Test123\"\r\n        }\r\n    }\r\n}\r\n"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Sent for cancellation","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"./code/responses/transactionRefEntityCancel.json","language":"json","header":{"controls":{"copy":{}}},"lang":"json","source":"{\n    \"_embedded\": {\n        \"payments\": [\n            {\n                \"lastEvent\": \"Sent for Cancellation\",\n                \"value\": {\n                    \"amount\": 310,\n                    \"currency\": \"GBP\"\n                },\n                \"paymentInstrument\": {\n                    \"type\": \"card/plain\",\n                    \"card\": {\n                        \"number\": {\n                            \"last4Digits\": \"4444\"\n                        },\n                        \"brand\": \"mastercard\"\n                    }\n                }\n            }\n        ]\n    },\n    \"_links\": {\n        \"self\": {\n            \"href\": \"/paymentQueries/archivedPayments?entityReference=AccessWP&transactionReference=test111\"\n        }\n    }\n}\n"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Refused","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"./code/responses/transactionRefEntityRefused.json","language":"json","header":{"controls":{"copy":{}}},"lang":"json","source":"{\n    \"_embedded\": {\n        \"payments\": [\n            {\n                \"lastEvent\": \"Refused\",\n                \"value\": {\n                    \"amount\": 310,\n                    \"currency\": \"GBP\"\n                },\n                \"paymentInstrument\": {\n                    \"type\": \"card/plain\",\n                    \"card\": {\n                        \"number\": {\n                            \"last4Digits\": \"4444\"\n                        },\n                        \"brand\": \"mastercard\"\n                    }\n                },\n                \"_links\": {\n                    \"payments:refund\": {\n                        \"href\": \"https://try.access.worldpay.com/payments/settlements/refunds/full/eyJrIjoiazNhYjYzMiIsImxpbmtWZXJzaW9uIjoiNS4wLjAifQ==.sN:g8wd64bwkbrp0md+bPxcanBnk2zLdsIqSa1pR99GeDrCwEtsymFb5gQw9WlrStDTK3eIWPy93y:7njc4649JSrU7+vFDl1J36+cwOkX0lW4Z+fnZKMutoUGX3m1:mAEt7xeLgrG3DmyZ+KdP10YlVEr5e6EVc4iYqaYytIPYf:VXab5cMYWO6LS0UzlfoW8PkXm9A8Gx:X:2vAwKFXFzKnt23AOHd1MAcGi2rYDmNWql5dV+zBj9zyT7GZXrLmjasoJJfxtEasqXGr:dzHXp1nU+oBzi04ZLL+c8GFiU=\"\n                    },\n                    \"payments:partialRefund\": {\n                        \"href\": \"https://try.access.worldpay.com/payments/settlements/refunds/partials/eyJrIjoiazNhYjYzMiIsImxpbmtWZXJzaW9uIjoiNS4wLjAifQ==.sN:g8wd64bwkbrp0md+bPxcanBnk2zLdsIqSa1pR99GeDrCwEtsymFb5gQw9WlrStDTK3eIWPy93y:7njc4649JSrU7+vFDl1J36+cwOkX0lW4Z+fnZKMutoUGX3m1:mAEt7xeLgrG3DmyZ+KdP10YlVEr5e6EVc4iYqaYytIPYf:VXab5cMYWO6LS0UzlfoW8PkXm9A8Gx:X:2vAwKFXFzKnt23AOHd1MAcGi2rYDmNWql5dV+zBj9zyT7GZXrLmjasoJJfxtEasqXGr:dzHXp1nU+oBzi04ZLL+c8GFiU=\"\n                    },\n                    \"payments:reversal\": {\n                        \"href\": \"https://try.access.worldpay.com/payments/sales/reversals/eyJrIjoiazNhYjYzMiIsImxpbmtWZXJzaW9uIjoiNS4wLjAifQ==.sN:g8wd64bwkbrp0md+bPxcanBnk2zLdsIqSa1pR99GeDrCwEtsymFb5gQw9WlrStDTK3eIWPy93y:7njc4649JSrU7+vFDl1J36+cwOkX0lW4Z+fnZKMutoUGX3m1:mAEt7xeLgrG3DmyZ+KdP10YlVEr5e6EVc4iYqaYytIPYf:VXab5cMYWO6LS0UzlfoW8PkXm9A8Gx:X:2vAwKFXFzKnt23AOHd1MAcGi2rYDmNWql5dV+zBj9zyT7GZXrLmjasoJJfxtEasqXGr:dzHXp1nU+oBzi04ZLL+c8GFiU=\"\n                    }\n                }\n            }\n        ]\n    },\n    \"_links\": {\n        \"self\": {\n            \"href\": \"/paymentQueries/archivedPayments?entityReference=AccessWP&transactionReference=test444\"\n        }\n    }\n}\n"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Sent for settlement","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"./code/responses/transactionRefEntitySettle.json","language":"json","header":{"controls":{"copy":{}}},"lang":"json","source":"{\n    \"_embedded\": {\n        \"payments\": [\n            {\n                \"lastEvent\": \"Sent for Settlement\",\n                \"value\": {\n                    \"amount\": 310,\n                    \"currency\": \"GBP\"\n                },\n                \"paymentInstrument\": {\n                    \"type\": \"card/plain\",\n                    \"card\": {\n                        \"number\": {\n                            \"last4Digits\": \"4444\"\n                        },\n                        \"brand\": \"mastercard\"\n                    }\n                },\n                \"_links\": {\n                    \"payments:refund\": {\n                        \"href\": \"https://try.access.worldpay.com/payments/settlements/refunds/full/eyJrIjoiazNhYjYzMiIsImxpbmtWZXJzaW9uIjoiNS4wLjAifQ==.sN:g8wd64bwkbrp0md+bPxcanBnk2zLdsIqSa1pR99GeDrCwEtsymFb5gQw9WlrStDTK3eIWPy93y:7njc4649JSrU7+vFDl1J36+cwOkX0lW4Z+fnZKMutoUGX3m1:mPhJbP6pkC5Wn5uXMTHs8Y4lVEr5e6EVc4iYqaYytIPYf:VXab5cMYWO6LS0UzlfoW8PkXm9A8Gx:X:2vAwKFXFzKnt23AOHd1MAcGi2rYDmNWql5dV+zBj9zyT7GZXrLmjasoJJfxtEasqXGr:dzHXp1nU+oBzi04ZLL+c8GFiU=\"\n                    },\n                    \"payments:partialRefund\": {\n                        \"href\": \"https://try.access.worldpay.com/payments/settlements/refunds/partials/eyJrIjoiazNhYjYzMiIsImxpbmtWZXJzaW9uIjoiNS4wLjAifQ==.sN:g8wd64bwkbrp0md+bPxcanBnk2zLdsIqSa1pR99GeDrCwEtsymFb5gQw9WlrStDTK3eIWPy93y:7njc4649JSrU7+vFDl1J36+cwOkX0lW4Z+fnZKMutoUGX3m1:mPhJbP6pkC5Wn5uXMTHs8Y4lVEr5e6EVc4iYqaYytIPYf:VXab5cMYWO6LS0UzlfoW8PkXm9A8Gx:X:2vAwKFXFzKnt23AOHd1MAcGi2rYDmNWql5dV+zBj9zyT7GZXrLmjasoJJfxtEasqXGr:dzHXp1nU+oBzi04ZLL+c8GFiU=\"\n                    },\n                    \"payments:reversal\": {\n                        \"href\": \"https://try.access.worldpay.com/payments/sales/reversals/eyJrIjoiazNhYjYzMiIsImxpbmtWZXJzaW9uIjoiNS4wLjAifQ==.sN:g8wd64bwkbrp0md+bPxcanBnk2zLdsIqSa1pR99GeDrCwEtsymFb5gQw9WlrStDTK3eIWPy93y:7njc4649JSrU7+vFDl1J36+cwOkX0lW4Z+fnZKMutoUGX3m1:mPhJbP6pkC5Wn5uXMTHs8Y4lVEr5e6EVc4iYqaYytIPYf:VXab5cMYWO6LS0UzlfoW8PkXm9A8Gx:X:2vAwKFXFzKnt23AOHd1MAcGi2rYDmNWql5dV+zBj9zyT7GZXrLmjasoJJfxtEasqXGr:dzHXp1nU+oBzi04ZLL+c8GFiU=\"\n                    }\n                }\n            }\n        ]\n    },\n    \"_links\": {\n        \"self\": {\n            \"href\": \"/paymentQueries/archivedPayments?entityReference=AccessWP&transactionReference=test222\"\n        }\n    }\n}\n"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Sent for refund","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"./code/responses/transactionRefEntityRefund.json","language":"json","header":{"controls":{"copy":{}}},"lang":"json","source":"{\n    \"_embedded\": {\n        \"payments\": [\n            {\n                \"lastEvent\": \"Sent for Refund\",\n                \"value\": {\n                    \"amount\": 500,\n                    \"currency\": \"GBP\"\n                },\n                \"paymentInstrument\": {\n                    \"type\": \"card/plain\",\n                    \"card\": {\n                        \"number\": {\n                            \"last4Digits\": \"1111\"\n                        },\n                        \"brand\": \"visa\"\n                    }\n                }\n            }\n        ]\n    },\n    \"_links\": {\n        \"self\": {\n            \"href\": \"/paymentQueries/archivedPayments?entityReference=AccessWP&transactionReference=AtiqTest5thJulyRefund\"\n        }\n    }\n}\n"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"lastevent-mapping","__idx":7},"children":["lastEvent mapping"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["We return a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["lastEvent"]}," in the response from Payment Queries for queries on historical payments, and also for ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET"]}," requests made from Payments API. In these scenarios, the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["lastEvent"]}," is the outcome of a payment command (eg ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorized"]},",",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Refused"]}," etc)."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/payment-queries/query-by-trans-ref"},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Query payments by transaction reference"]}]}," also provides ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["lastEvent"]}," in the API response, which is the last ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["eventName"]}," received in the payment life cycle."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The table below shows a mapping between these."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Payment Queries eventName"},"children":["Payment Queries eventName"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Payments API lastEvent"},"children":["Payments API lastEvent"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["authorizationRequested"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["N/A"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["authorizationSucceeded"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorized"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Sent for Settlement"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Expired"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["authorizationRefused"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Refused"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["authorizationFailed"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Error"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["authorizationTimedOut"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorized"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Sent for Settlement"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Refused"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Error"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Expired"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["saleRequested"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["N/A"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["saleSucceeded"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["N/A"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["saleRefused"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["N/A"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["saleFailed"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["N/A"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["saleTimedOut"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["N/A"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["settlementRequested"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["N/A"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["settlementRequestSubmitted"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Sent for Settlement"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Expired"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["settlementRequestSubmissionFailed"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorized"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Error"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["settlementRequestSubmissionTimedOut"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorized"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Error"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Sent for Settlement"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Expired"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["refundRequested"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["N/A"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["refundRequestSubmitted"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Sent for Refund"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Expired"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["refundRequestSubmissionFailed"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Sent for Settlement"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Error"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["refundRequestSubmissionTimedOut"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Sent for Refund"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Error"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Sent for Settlement"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Expired"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["reversalRequested"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["N/A"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["reversalRequestSubmitted"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Sent for Refund"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Sent for Cancellation"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Expired"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["reversalRequestSubmissionFailed"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Sent for Settlement"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Error"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["reversalRequestSubmissionTimedOut"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Sent for Refund"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Error"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Sent for Cancellation"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Expired"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cancellationRequested"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["N/A"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cancellationRequestSubmitted"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorized"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Sent for Cancellation"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Expired"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cancellationRequestSubmissionFailed"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorized"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Error"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cancellationRequestSubmissionTimedOut"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Sent for Cancellation"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Error"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Expired"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Status updates for Payments API GET requests and Payment Queries historical transactions may take up to 15 minutes."]}]}]},"headings":[{"value":"Query historical payments","id":"query-historical-payments","depth":1},{"value":"Request","id":"request","depth":2},{"value":"Example","id":"example","depth":3},{"value":"Parameter descriptions","id":"parameter-descriptions","depth":3},{"value":"Response","id":"response","depth":2},{"value":"Response schema","id":"response-schema","depth":3},{"value":"Response examples","id":"response-examples","depth":3},{"value":"lastEvent mapping","id":"lastevent-mapping","depth":3}],"frontmatter":{"seo":{"title":"Query historical payments"}},"lastModified":"2026-05-13T07:59:15.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/payment-queries/query-archive","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}