Last Updated: 04 December 2024 | Change Log

Query a payment

Send a request to find out the current status of your payment after it has been authorized.

Note
It can take up to 15 minutes for a payment event to update.

How it works

There's two ways you can query a payment:

  • The payments:events action link from your response
  • The payments event resource which takes transactionRef and entity as query parameters
  1. You receive a payments:events action link in your:

  2. Make a GET request on the action link that's received in your request:
    GET https://try.access.worldpay.com/payments/events/eyJrIjoiazNhYjYzMiJ9

  3. We return the last event and your next available actions.

The response

{
    "lastEvent": "Authorized",
    "_links": {
        "payments:cancel": {
            "href": "https://try.access.worldpay.com/payments/authorizations/cancellations/eyJrIjoiazNhYjYzMiJ9"
        },
        "payments:settle": {
            "href": "https://try.access.worldpay.com/payments/settlements/full/eyJrIjoiazNhYjYzMiJ9"
        },
        "payments:partialSettle": {
            "href": "https://try.access.worldpay.com/payments/settlements/partials/eyJrIjoiazNhYjYzMiJ9"
        },
        "curies": [{
            "name": "payments",
            "href": "https://try.access.worldpay.com/rels/payments/{rel}",
            "templated": true
        }]
    }
}

Using the transaction reference and entity

Note
This action is only to be used for recovery purposes. Use this action if your authorization requests timed out. The response determines if your authorization request was successful and your next available actions are returned.

  1. You make a query using the transactionReference and entity parameters:
    GET https://try.access.worldpay.com/payments/events?transactionRef=REF123&entity=default

    Remember

    Replace REF123 with the unique transactionReference used in your authorization request and replace default with your merchant entity.

  2. We return the lastEvent and your next available actions.

The response

{
    "lastEvent": "Authorized",
    "_links": {
        "payments:cancel": {
            "href": "https://try.access.worldpay.com/payments/authorizations/cancellations/eyJrIjoiazNhYjYzMiJ9"
        },
        "payments:settle": {
            "href": "https://try.access.worldpay.com/payments/settlements/full/eyJrIjoiazNhYjYzMiJ9"
        },
        "payments:partialSettle": {
            "href": "https://try.access.worldpay.com/payments/settlements/partials/eyJrIjoiazNhYjYzMiJ9"
        },
        "curies": [{
            "name": "payments",
            "href": "https://try.access.worldpay.com/rels/payments/{rel}",
            "templated": true
        }]
    }
}