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

注释:该 API 仅用于预览用途并会随时更改。

SCA 豁免评估

POST 您的请求到 exemptions:assess 操作链接。

评估示例请求

POST https://try.access.worldpay.com/exemptions/assessment

风险评估请求正文:

Copied!
{
  "transactionReference": "Memory265-13/08/1876",
  "merchant": {
      "entity": "MindPalaceLtd"
  },
  "doNotApplyExemption": false, 
  "instruction": {
    "paymentInstrument": {
      "type": "card/front",
      "cardHolderName": "Sherlock Holmes",
      "cardNumber": "4444333322221111",
      "cardExpiryDate": {
        "month": 5,
        "year": 2035
      },
      "billingAddress": {
          "address1": "221B Baker Street",
          "address2": "Marylebone",
          "address3": "Westminster",
          "postalCode": "NW1 6XE",
          "city": "London",
          "state": "Greater London",
          "countryCode": "GB"
      }
    },
    "value": {
      "currency": "GBP",
      "amount": 250
    }
  },
  "deviceData": {
    "collectionReference": "0_4XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX8G6"
  },
  "riskData": {
    "account": {
      "email": "sherlock.holmes@example.com",
      "dateOfBirth": "1990-09-09"
    },
    "transaction": {
      "firstName": "Sherlock",
      "lastName": "Holmes",
      "phoneNumber": "00000000000000"
    },
    "shipping": {
      "firstName": "James",
      "lastName": "Moriarty",
      "address": {
        "address1": "The Palatine Centre",
        "address2": "Durham University",
        "address3": "Stockton Road",
        "postalCode": "DH1 3LE",
        "city": "Durham",
        "state": "County Durham",
        "countryCode": "GB",
        "phoneNumber": "01911234321"
      }
    }
  }
}
{
  "transactionReference": "Memory265-13/08/1876",
  "merchant": {
      "entity": "MindPalaceLtd"
  },
  "doNotApplyExemption": false,
  "instruction": {
    "paymentInstrument": {
      "type": "card/tokenized",
      "href": "https://try.access.worldpay.com/tokens/MTIzNDU2Nzg5MDEyMzQ1Ng"
    },
    "value": {
      "currency": "GBP",
      "amount": 250
    }
  },
  "deviceData": {
    "collectionReference": "0_4XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX8G6"
  },
  "riskData": {
    "account": {
      "email": "test@test.com",
      "dateOfBirth": "1990-09-09"
    },
    "transaction": {
      "firstName": "Sherlock",
      "lastName": "Holmes",
      "phoneNumber": "02031234321"
    },
    "shipping": {
      "firstName": "James",
      "lastName": "Moriarty",
      "address": {
        "address1": "The Palatine Centre",
        "address2": "Durham University",
        "address3": "Stockton Road",
        "postalCode": "DH1 3LE",
        "city": "Durham",
        "state": "County Durham",
        "countryCode": "GB",
        "phoneNumber": "01911234321"
      }
    }
  }
}
参数必需描述
transactionReference评估参考号。例如,电子商务订单代码。
merchant.entity作为加入流程的一部分而创建,用于在 Access Worldpay 中发送评估请求。
doNotApplyExemption申请豁免,但不要在付款中应用。用于最初的上线运行,以建立数据模型并获得更加可靠的豁免预测。
instruction包含与评估相关的所有支付信息的对象。
instruction.paymentInstrument包含银行卡资料或 Token 位置的对象。
paymentInstrument.type所使用的 paymentInstrument 的识别码。

type: card/fronttypecard/tokenized
paymentInstrument.billingAddress包含账单邮寄地址信息的对象。如果已包括,则您必须至少要发送:
instruction.value包含有关订单价值信息的对象。
value.currency三位数货币代码。
请参见支持的货币列表。
value.amount订单金额。这是一个包含小数位的整数,e.g.,如果小数位是二,则 250 就表示 2.50.您可以在我们的货币表中查找相关小数位。
应用 riskProfile 时,评估请求中使用的金额必须对应于访问付款请求中的支付金额。
deviceData.collectionReference利用在 ThreatMetrix设备数据收集中指定的 sessionId 将此数据链接到评估。

注释:如果没有提供值,则仍会执行评估,但不会受益于其他的风险分析或基于该值的任何手动规则(e.g.地点)。

评估请求中的附加字段

如果您有这些数据,我们建议您提供,因为它可以提高豁免评估的准确性。

共有三个 riskData 对象可供您纳入请求中:

评估响应

最佳实践:Access Worldpay 会在服务响应标题中返回 WP-CorrelationId。我们强烈建议您将此信息记录下来。我们使用 WP-CorrelationId 来检查单个服务请求。

该响应包含您的 assessment 请求的结果。

Copied!
{
  "outcome": "exemption",
  "transactionReference": "Memory265-13/08/1876",
  "exemption": {
    "placement": "authorization",
    "type": "lowValue"
  },
  "riskProfile": {
    "href": "https://access.worldpay.com/riskprofile/eyJrIjoxLCJkIjoialRBL0FFelBzcnZ"
  }
}
{
  "outcome": "noExemption",
  "transactionReference": "Memory265-13/08/1876",
  "riskProfile": {
    "href": "https://access.worldpay.com/riskprofile/eyJrIjoxLCJkIjoialRBL0FFelBzcnZ"
  }
}
参数描述
outcome豁免的建议:
  • exemption- 提供了豁免,继续进行付款或身份验证(基于放置推荐)
  • noExemption - 未提供豁免
若要了解有关 outcomes 以及如何再现这些结果的更多信息,请参见豁免测试
exemption.placement
  • authorization - 对支付授权应用豁免
  • authentication - 对 3DS 身份验证应用豁免
注释:目前只有放置“授权”会被配置为暂时返回,直到 Access 3DS 支持豁免放置为止
exemption.type要应用的豁免类型
  • lowRisk - 应用低风险豁免
  • lowValue - 应用低价值豁免
riskProfile.href可以在支付授权请求中使用的资源,该请求显示了豁免评估结果。用于:
  • 应用豁免(如已提供)
  • 更新日期模型,以便使未来评估更准确

应用豁免

应用提供给支付授权请求的 riskProfile。这样将执行两项功能:

  • 将豁免应用于支付请求。
  • 可让数据模型从结果中学习,从而改进未来的评估请求。

即使未提供豁免,您也应该在支付请求中应用 riskProfile。

软拒绝

在应用到支付时豁免不成功的情况下(已认可 + 已授权),发卡机构将采用软拒绝(拒绝代码 65)予以回应。该操作的下一个符合逻辑的步骤是继续进行3DS 身份验证

后续步骤


豁免测试