Translation disclaimer

Documentation is written in English and subsequently translated. This page, therefore, might not have the most up-to-date content. If any questions arise relating to the accuracy of the translated content, please refer to the English version of the page.

Menu

查询支付

发送请求以了解支付被 authorized 之后您的支付的当前状态。

注释:更新支付事件最长可能需要 15 分钟。

工作方式

共有两种查询支付的方式:

  • 您的响应中的 payments:events 操作链接
  • 以 transactionRef 和实体作为查询参数的支付事件资源
  1. 您会在以下响应中收到 payments:events 操作链接:

  2. 在您的请求中收到的操作链接上做出 GET 请求:
    GET https://try.access.worldpay.com/payments/events/eyJrIjoiazNhYjYzMiJ9

  3. 我们会返回上一个事件和您后续可用的操作。

响应

Copied!
{
    "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
        }]
    }
}

使用交易参考号和实体

注释:该操作只可用于恢复目的。如果您的授权请求超时,则使用该操作。该响应可确定您的授权请求是否成功,并返回后续可用操作。

  1. 使用 transactionReference 和实体参数进行查询:
    GET https://try.access.worldpay.com/payments/events?transactionRef=REF123&entity=default

    请记住:用您的授权请求中使用的独特 transactionReference 替换 REF123,并用您的商户实体替换 default

  2. 我们会返回 lastEvent 和您后续可用的操作。

响应

Copied!
{
    "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
        }]
    }
}