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

管理您的支付

查询

通过action:query操作链接,发送GET请求。

注释:该请求不需要请求正文。

查询示例请求

GET https://try.access.worldpay.com/payments/alternative/action/ideal/query?transactionReference=uniqueReference&entity=yourMerchantEntity

...的查询响应 sentForSettlement

您会接收到:

示例响应:

Copied!
{
  "lastEvent": "sentForSettlement",
  "_links": {
    "action:query": {
      "href": "https://try.access.worldpay.com/payments/alternative/action/ideal/query/payment?transactionReference={transactionReference}&entity={entity}"
    },
    "action:refund": {
      "href": "https://try.access.worldpay.com/payments/alternative/action/ideal/refunds/full/WvNPnBd78Z2Nc_yAdaeAmeCuoRS0-RgC0as4j9DhHvU="
    },
    "action:partialRefund": {
      "href": "https://try.access.worldpay.com/payments/alternative/action/ideal/refunds/partials/WvNPnBd78Z2Nc_yAdaeAmeCuoRS0-RgC0as4j9DhHvU="
    },
    "curies": [{
        "name": "action",
        "href": "https://try.access.worldpay.com/rels/payments/alternative/action/ideal/{rels}",
        "templated": true
      }]
  }
}

lastEvents 事件的查询响应,而非 sentForSettlement

您会接收到:

  • HTTP 代码 201
  • 查询请求的lastEvent
  • 查询链接

示例响应:

Copied!
{
    "lastEvent": "|Authorized|sentForRefund|refused|cancelled|error|refundFailed",
    "_links": {
      "action:query": {
        "href": "https://try.access.worldpay.com/payments/alternative/action/ideal/query/payment?transactionReference={transactionReference}&entity={entity}"
      },
      "curies": [{
          "name": "action",
          "href": "https://try.access.worldpay.com/rels/payments/alternative/action/ideal/{rels}",
          "templated": true
        }]
    }
}

全部退款

如要进行退款,最新状态必须为sentForSettlement

POST 您的请求到 action:full-refund 操作链接。

注释:该请求不需要请求正文。

全部退款示例请求

POST https://try.access.worldpay.com/payments/alternative/action/ideal/refunds/full/WvNPnBd78Z2Nc_yAdaeAmeCuoRS0-RgC0as4j9DhHvU=

全部退款响应

您会接收到:

  • sentForRefund - 退款已被接受。
  • refundFailed - 退款失败。
  • sentForSettlement - 稍后再次查询付款。退款可能正在处理中。
  • HTTP 代码 202
  • 查询链接

示例响应:

Copied!
{
  "_links": {
    "action:query": {
      "href": "https://try.access.worldpay.com/payments/alternative/action/ideal/query/payment?transactionReference={transactionReference}&entity={entity}"
    },
    "curies": [{
        "name": "action",
        "href": "https://try.access.worldpay.com/rels/payments/alternative/action/ideal/{rels}",
        "templated": true
      }]
  }
}

可能的结果

  • sentForRefund - 已接受退款请求。
  • refundFailed - 退款失败。
  • sentForSettlement - 请稍后再次查询付款。退款可能已在处理中。

部分退款

部分退款请求

在正文中发送要部分退款的 amount 和授权 currency

部分退款示例请求

POST https://try.access.worldpay.com/payments/alternative/action/ideal/refunds/partials/WvNPnBd78Z2Nc_yAdaeAmeCuoRS0-RgC0as4j9DhHvU=

部分退款请求正文:

Copied!
{
  "value": {
    "amount": 100,
    "currency": "EUR"
  },
  "reference": "partial-refund-reference"
}

部分退款请求参数的描述

参数必需描述
value.amount所使用的 amount 的识别码。
value.currency所使用的 currency 的识别码。
reference由您生成的独特参考号,用于识别部分退款。有关更多信息和最佳实践,请参见参考号格式

部分退款响应

您会接收到:

  • HTTP 代码 202
  • 链接到查询您的付款

示例响应:

Copied!
{
  "_links": {
    "action:query": {
      "href": "https://try.access.worldpay.com/payments/alternative/action/ideal/query/payment?transactionReference={transactionReference}&entity={entity}"
    },
    "curies": [
      {
        "name": "action",
        "href": "https://try.access.worldpay.com/rels/payments/alternative/action/ideal/{rels}",
        "templated": true
      }
    ]
  }
}