Last Updated: 23 October 2024 | Change Log
Query a payment
Send a request to find out the current status of your payment after it has been authorized
.
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
Using the events action link from your response
You receive a
payments:events
action link in your:Make a
GET
request on the action link that's received in your request:
GET
https://try.access.worldpay.com/payments/events/eyJrIjoiazNhYjYzMiJ9
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
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.
You make a query using the transactionReference and entity parameters:
GET
https://try.access.worldpay.com/payments/events?transactionRef=REF123&entity=default
NoteReplace
REF123
with the uniquetransactionReference
used in your authorization request and replacedefault
with your merchant entity.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 }] } }