Last Updated: 18 November 2024 | Change Log

Transaction reference queries

Provide a transactionReference to find the matching card payment.

Note

The API returns data for payments processed after 25 June 2024. For payments processed before then, you can query for historical payments.

Request

The transaction reference is a unique reference generated by you. It is used to identify a payment throughout its lifecycle. We highly recommend that you save the transactionReference of a payment and use it to query payments when needed.

GET https://try.access.worldpay.com/paymentQueries/payments?transactionReference={transactionReference}

Example

GET https://try.access.worldpay.com/paymentQueries/payments?transactionReference=Memory265-13/08/1876

Parameter description

ParameterRequiredDescription
transactionReferenceA unique reference generated by you. It is used to identify a payment throughout its lifecycle.

Response

The response contains summary information about the payment associated with the transactionReference. For detailed information about a payment you should run a query using the paymentId.

Response schema

_linksobjectrequired

links to the pages.

_links.​selfobjectrequired

Self link to the page.

_links.​self.​hrefstring

First page as per the pageSize.

_links.​nextobject

Next page link if the response contains more pages.

_embeddedobjectrequired
_embedded.​paymentsArray of objects

Array of payments within the date range.

Response examples

{
    "_links": {
        "self": {
            "href": "/paymentQueries/payments?transactionReference=33070868-3608-4a71-8ad8-e7c8fdb83ae8"
        }
    },
    "_embedded": {
        "payments": [
            {
                "timestamp": "2024-05-02T07:10:58.319Z",
                "transactionReference": "33070868-3608-4a71-8ad8-e7c8fdb83ae8",
                "narrative": {
                    "line1": "trading name",
                    "line2": "trading name"
                },
                "transactionType": "cardOnFile",
                "authorizationType": "authorization",
                "entity": "default",
                "paymentInstrument": {
                    "type": "card/plain+masked",
                    "card": {
                        "number": {
                            "last4Digits": "1000"
                        },
                        "brand": "visa",
                        "fundingType": "debit"
                    }
                },
                "value": {
                    "currency": "GBP",
                    "amount": 42
                },
                "_links": {
                    "self": {
                        "href": "/paymentQueries/payments/d629e528-2236-46ea-b393-0d6777028b2b"
                    }
                }
            }
        ]
    }
}

Historical payments

If the payment was processed before 25 June 2024, you must query our historical payments library.

You receive a next action link in the response. Add your entityReference and transactionReference to query historical payments.

Example

{
    "_links": {
        "self": {
            "href": "/paymentQueries/payments?transactionReference=demo-test1"
        },
        "paymentQueries:queryArchive": {
            "href": "/paymentQueries/archivedPayments?transactionReference=demo-test1&entityReference={entityReference}",
            "templated": true
        }
    },
    "_embedded": {
        "payments": []
    }
}