带有付款人身份验证 API 的 3DS
本主题概述了使用付款人身份验证 API 将 3DS 添加到 Mastercard Gateway 集成所需的所有步骤,包括如何使用身份验证结果处理付款。
要查看使用付款人身份验证 API 的 3DS 流中使用的 API 请求和响应的示例,请下载 Postman 集合。
完成集成后,请参阅测试 3DS 集成进行测试。
先决条件
作为此实施的先决条件,您应该已经实施了基本的 Direct Payment 集成。
步骤 1: 发起身份验证
Initiate Authentication
操作用于根据以下内容确定您可以为给定卡使用的 3DS 版本:
- 在您的商家配置文件上配置的 3DS 版本。
- 卡类型。
- 您在请求中指定的首选项。
- 网关向相关身份验证提供商发送的请求结果,用于检查给定卡的可用性或支持情况,以及
- 由您或 your payment service provider (PSP) 配置的网关的 3DS 交易筛选规则。
网关的 3DS 功能仅支持 3DS2。
此操作还支持出于某些目的执行任何后台活动(如 ACS 方法调用),如收集其他付款人数据以支持后续的 Authenticate Payer
操作。
Initiate authentication 请求
您可以通过在 Initiate Authentication 请求中提供以下字段来发起身份验证:
表: Initiate Authentication 请求字段
字段 | 必需/可选 | 说明 |
---|---|---|
session.id 、sourceOfFunds.provided.card.* 或 sourceOfFunds.token |
必需 | 用于付款的卡的详细信息。 您还可以使用网络令牌和设备付款令牌作为付款人身份验证中的资金来源。 有关详细信息,请参见常见问题。 |
order.currency |
必需 | 订单的货币。 |
transaction.id |
必需 | 此支付身份验证的唯一识别码。 |
order.id |
必需 | 此订单的唯一识别码。 |
authentication.channel |
必需 | 发起身份验证请求的通道。 您可以指定以下其中一项:
|
authentication.purpose |
可选 | 身份验证的目的。 默认情况下,此字段设置为“PAYMENT_TRANSACTION”,指示在处理卡付款时要执行身份验证。 不过,您可以指定其他目的来指示非支付身份验证。 如果您正在建立付款协议但没有同时处理付款,请提供 ADD_CARD 作为身份验证目的。 有关更多信息,请参见如何提交非支付身份验证请求? 如需 3DS 支付验证用例的详细列表,请参阅使用 3D 验证的持卡人发起付款。 |
authentication.acceptVersions |
可选 | 您接受用于此付款的 3DS 版本。 如果您未指定版本,则接受 3DS2。 网关将使用 3DS2(如果发卡机构和卡支持)。 如果 3DS2 不可用,则身份验证无法继续。 |
order.merchantCategoryCode |
可选 | 商家类别代码。 在您希望覆盖在收单行链接上配置的默认值时提供商家类别代码。 |
如果您在 ACS 方法调用完成之前提交 Authenticate Payer 请求,Authenticate Payer 请求将继续,但 Authenticate Payer 响应包含 authentication.3ds2.methodCompleted = false。 如果发卡机构的 ACS 已成功完成方法调用来获取有关付款人浏览器的其他信息,AUTHENTICATE PAYER 响应中的 authentication.3ds2.methodCompleted 字段为 true。
Initiate authentication 响应
网关在 Initiate Authentication 响应中返回以下关键字段:
authentication.version
: 如果付款人可以进行 3DS 身份验证,则返回 3DS2。 否则,返回NONE
。authentication.3ds2.methodSupported
: 如果 3DS2 可用且发卡机构的 ACS 支持方法调用,此字段将显示 SUPPORTED。 ACS 使用方法调用在身份验证请求之前收集其他数据,来增加提供无障碍身份验证的可能性。 方法调用在隐藏的内嵌框架中触发,因此付款人看不到。 完成后也不会提供任何回调。transaction.authenticationStatus
: 如果您需要有关身份验证状态的更多详细信息,请查看此字段。response.gatewayRecommendation
: 通过此字段您可以确定下一个步骤。 请注意,具体建议仅基于您或 your payment service provider 配置的 3DS 交易筛选规则。- DO_NOT_PROCEED: 请勿对此卡进行 3DS 身份验证,但您可能希望在没有 3DS 数据的情况下继续付款,或者您可以为付款人提供尝试其他付款方式的选项。
- PROCEED: 您可以使用 Authenticate Payer 操作继续对付款人进行身份验证。
- RESUBMIT_WITH_ALTERNATIVE_PAYMENT_DETAILS: 要求付款人提供备用付款详细信息。 例如,新卡或其他付款方式,然后使用新详细信息重新提交请求。 不要重新提交相同的请求。 这适用于 API 版本 70 及更高版本。
authentication.redirect.html
: 如果 authentication.3ds2.methodSupported = SUPPORTED,则将此字段的内容插入到显示给付款人的页面中。 要执行此操作,请将文本内容添加到隐藏的 DIV 元素中,然后在 HTML DOM 中指定脚本标识符。 这将自动构造并发布表单。 例如,
div.innerHtml= response.authentication.redirect.html; eval(document.getElementById('initiate-authentication-script').text)
URL | https://testpg.mpgs.axisbank.com/api/rest/version/<version>/merchant/<your_merchant_ID>/order/<your_order_ID>/transaction/<your_transaction_ID> |
HTTP 方法 | PUT |
{ "authentication":{ "acceptVersions":"3DS1,3DS2", "channel":"PAYER_BROWSER", "purpose":"PAYMENT_TRANSACTION" }, "correlationId":"test", "order":{ "currency":"AUD" }, "sourceOfFunds":{ "provided":{ "card":{ "number":"<card_number>" } } }, "apiOperation":"INITIATE_AUTHENTICATION" }
{ "authentication": { "3ds2": { "directoryServerId": "A999999999", "methodCompleted": false, "methodSupported": "SUPPORTED", "protocolVersion": "2.1.0", "requestorId": "test40Field@S^2sfds2ID", "requestorName": "test40Field@S^2sfds2Name" }, "acceptVersions": "3DS1,3DS2", "channel": "PAYER_BROWSER", "purpose": "PAYMENT_TRANSACTION", "redirect": { "customizedHtml": { "3ds2": { "methodPostData": "eyJ0aHJlZURTTWV0aG9kTm90aWZpY2F0aW9uVVJMIjoiaHR0cHM6Ly9kbDAzYXNwYWxsMDN2Lm1wZ3NkZXYubWFzdGVyY2FyZC5pbnQvY2FsbGJhY2tJbnRlcmZhY2UvZ2F0ZXdheS9mOGIzNjQ5ZDRiOWU3OTg4M2M0ODE4MmRjZmRkY2JjYTAxMTE3MTc0ZTkxODRiODAzM2NkMzg3NTQ4MjlhMTRlIiwidGhyZWVEU1NlcnZlclRyYW5zSUQiOiJjYTdjMTU0YS1jZTZkLTRkNjYtYTc4My02MjdmZTcyMjQ4ZTEifQ==", "methodUrl": "<method_url>" } }, "html": "<div id=\"initiate3dsSimpleRedirect\" xmlns=\"http://www.w3.org/1999/html\"> <iframe id=\"methodFrame\" name=\"methodFrame\" height=\"100\" width=\"200\" > </iframe> <form id =\"initiate3dsSimpleRedirectForm\" method=\"POST\" action=\"<method_url>" target=\"methodFrame\"> <input type=\"hidden\" name=\"threeDSMethodData\" value=\"eyJ0aHJlZURTTWV0aG9kTm90aWZpY2F0aW9uVVJMIjoiaHR0cHM6Ly9kbDAzYXNwYWxsMDN2Lm1wZ3NkZXYubWFzdGVyY2FyZC5pbnQvY2FsbGJhY2tJbnRlcmZhY2UvZ2F0ZXdheS9mOGIzNjQ5ZDRiOWU3OTg4M2M0ODE4MmRjZmRkY2JjYTAxMTE3MTc0ZTkxODRiODAzM2NkMzg3NTQ4MjlhMTRlIiwidGhyZWVEU1NlcnZlclRyYW5zSUQiOiJjYTdjMTU0YS1jZTZkLTRkNjYtYTc4My02MjdmZTcyMjQ4ZTEifQ==\" /> </form> <script id=\"initiate-authentication-script\"> var e=document.getElementById(\"initiate3dsSimpleRedirectForm\"); if (e) { e.submit(); if (e.parentNode !== null) { e.parentNode.removeChild(e); } } </script> </div>" }, "version": "3DS2" }, "correlationId": "test", "merchant": "TEST3DS12AUTH", "order": { "authenticationStatus": "AUTHENTICATION_AVAILABLE", "creationTime": "2022-06-24T06:57:32.714Z", "currency": "USD", "id": "TEST4", "lastUpdatedTime": "2022-06-24T06:57:32.661Z", "merchantCategoryCode": "1234", "status": "AUTHENTICATION_INITIATED", "totalAuthorizedAmount": 0, "totalCapturedAmount": 0, "totalRefundedAmount": 0 }, "response": { "gatewayCode": "AUTHENTICATION_IN_PROGRESS", "gatewayRecommendation": "PROCEED" }, "result": "SUCCESS", "sourceOfFunds": { "provided": { "card": { "brand": "MASTERCARD", "fundingMethod": "CREDIT", "number": "512345xxxxxx0008", "scheme": "MASTERCARD" } }, "type": "CARD" }, "timeOfLastUpdate": "2022-06-24T06:57:32.661Z", "timeOfRecord": "2022-06-24T06:57:32.714Z", "transaction": { "amount": 0, "authenticationStatus": "AUTHENTICATION_AVAILABLE", "currency": "USD", "id": "1", "type": "AUTHENTICATION" }, "version": "67" }
步骤 2: 对付款人进行身份验证
如果 Initiate Authentication 响应指示身份验证可用 (transaction.authenticationStatus=AUTHENTICATION_AVAILABLE),当收集了所有付款人和付款数据后,在付款人在结账页面上单击“立即支付”按钮时提交 Authenticate Payer 请求。
Authenticate Payer 请求
通过提供以下字段来提交此操作。
Authenticate Payer 请求字段
字段 | 必需/可选 | 说明 |
---|---|---|
session.id 、sourceOfFunds.provided.card.* 或 sourceOfFunds.token |
必需 | 用于付款的卡的详细信息。 使用与前面的 INITIATE AUTHENTICATION 操作相同的详细信息。 |
order.amount |
必需 | 订单总额。 |
transaction.id |
必需 | 交易 ID。 使用与前面的 Initiate Authentication 操作相同的 transaction.id 。 |
order.id |
必需 | 订单 ID。 与之前的 Initiate Authentication 操作相同的 order.id 。 |
device.ipAddress |
可选 | 如果 authentication.channel=PAYER_BROWSER,则需要此字段,但可以为了遵守当地法规在必要时有条件排除。 如果您支持 ITMX 本地交换 EMVCo 身份验证,则为必需。 EMV 3DS 身份验证从 API 版本 79 开始支持 IPv4 和 IPv6 地址。IPv6 仅用于 EMV 3DS 身份验证,不用于任何后续 Authorize、Pay 或其他操作。 |
sourceOfFunds.provided.card.nameOnCard |
可选 | 卡上的姓名。 如果您支持 ITMX 本地交换 EMVCo 身份验证,则为必需。 |
sourceOfFunds.provided.card.number |
可选 | 卡号。 如果您支持 ITMX 本地交换 EMVCo 身份验证,则为必需。 |
sourceOfFunds.provided.card.expiry |
可选 | 卡到期详细信息。 如果您支持 ITMX 本地交换 EMVCo 身份验证,则为必需。 |
authentication.redirectResponseUrl |
必需 | 完成付款人身份验证流程后,您想要将付款人重定向到的 URL。 如果您确定与付款人没有互动,则无需提供此 URL。 |
device.browser |
可选 | 付款人浏览器的用户-代理标头。 如果 authentication.channel = PAYER_BROWSER ,则为必需。 |
device.browserDetails 对象 |
可选 | 浏览器详细信息。 如果 authentication.channel = PAYER_BROWSER ,则为必需。 |
billing.address object 对象 |
可选 | 付款人的账单地址。 只要此字段可用,强烈建议您将它包含在请求中。 |
shipping.address 对象 |
可选 | 付款人的送货地址。 只要此字段可用,强烈建议您将它包含在请求中。 |
customer 对象 |
可选 | 付款人的详细信息。 只要此字段可用,强烈建议您将它包含在请求中。 |
Authenticate Payer 响应
AUTHENTICATE PAYER
响应中返回的字段取决于:
- 无障碍流或质询流。
- 如何发起身份验证请求 (authentication.channel)。
- 请求、会话、证书或密码的身份验证机制。
对于经过会话身份验证的操作,响应将被筛选以删除与付款人无关的数据,然后仅返回白名单字段。 有关详细信息,请参阅会话基础知识。 有关经过证书/密码验证的请求返回的字段,请参见经过证书/密码验证的请求的响应字段。
网关在 AUTHENTICATE PAYER
响应中返回以下关键字段:
transaction.authenticationStatus
:有关身份验证状态的详细信息。response.gatewayRecommendation
: 根据您或您的 PSP 配置的 3DS 交易筛选规则,对您是否应继续进行财务交易的建议:- DO_NOT_PROCEED: 不继续处理此卡,因为身份验证被拒绝或不可用。 但是,您可以在没有 3DS 数据的情况下继续付款,或者您可以向付款人提供尝试其他付款方式的选项。
- PROCEED: 您可以继续完成身份验证流程(也称为质询流),或者继续完成付款(也称为无障碍流)。
- DO_NOT_PROCEED_ABANDON_ORDER: 不要再次提交相同的请求。 支付服务提供商、组织或发卡机构要求您放弃订单。 此建议适用于 API 版本 70 及更高版本。
- RESUBMIT_WITH_ALTERNATIVE_PAYMENT_DETAILS: 要求付款人提供备用付款详细信息。 例如,新卡或其他付款方式,然后使用新详细信息重新提交请求。 不要重新提交相同的请求。 此建议适用于 API 版本 70 及更高版本。
authentication.redirect.html
: 将此字段的内容插入到显示给付款人的页面中。 要执行此操作,请将文本内容添加到 DIV 元素中,然后在 HTML DOM 中指定脚本标识符。 这将自动构造并发布表单。 例如:
div.innerHtml= response.authentication.redirect.html; eval(document.getElementById(‘authenticate-payer-script’).text)
网关建议您继续:
- 如果 ACS 为付款人选择了无阻碍流,它会将付款人的浏览器重定向回您的网站,您可以继续执行步骤 3 来向网关提交后续付款。 网关获取与付款相关的身份验证数据,并确保只有通过您或您的 PSP 配置的所有 3DS 交易筛选规则后才会处理付款。
- 如果 ACS 为付款人选择了质询流,将使用响应中提供的
authentication.redirect.html
字段将付款人重定向到 ACS。 质询完成后,ACS 会将付款人重定向回您的网站并触发包含 orderId、transactionId、response.gatewayRecommendation 和 result 字段的回调。 根据response.gatewayRecommendation
字段中返回的值确定身份验证的结果。AUTHENTICATE PAYER
响应适用上述相同规则。 如果建议是 PROCEED,继续执行步骤 3。
您不应该依赖浏览器中返回的数据确定下一个处理步骤。 确保您在服务器中处理 Authenticate Payer 响应,或者从服务器执行 Retrieve Transaction 操作来确保响应成功。
经过证书/密码身份验证的请求的响应字段
下表列出了为经过证书/密码验证的请求返回的 AUTHENTICATE PAYER
响应字段,即,使用来自您的服务器的商家 ID 和 API 密码提交请求,而不是使用来自您的网站或付款人浏览器的会话 ID 提交。 有关详细信息,请参见常见问题。
authentication.3ds.authenticationToken
。表: 经过证书/密码身份验证的请求的响应字段
Response Field |
商家执行身份验证 |
---|---|
authentication.method | 是 |
authentication.3ds.authenticationToken | * |
authentication.3ds.acsEci | 是 |
authentication.3ds.transactionId | 是 |
authentication.3ds2.transactionStatus | * |
authentication.3ds2.acsTransactionId | * |
authentication.3ds2.dsTransactionId | * |
authentication.3ds2.3dsServerTransactionId | * |
authentication.3ds2.protocolVersion | * |
authentication.amount | 是 |
authentication.redirect.html | 是 |
authentication.time | 是 |
response.gatewayRecommendation | 是 |
transaction.type | 是 |
version | 是 |
timeOfRecord | 是 |
result | 是 |
response.debugInformation | * |
Authenticate Payer 响应字段
Authentication Payer 响应中返回的字段取决于:
- 实施的流,即无障碍流与质询流。
- 身份验证请求如何发起 (authentication.channel)
- 请求的身份验证机制,例如会话、证书或密码。
经过证书/密码身份验证的请求返回以下字段。 对于经过会话身份验证的操作,将对响应进行筛选以删除与付款人无关的数据,然后仅返回加入白名单的字段。 有关详细信息,请参阅会话身份验证。
Response Field |
商家执行身份验证 |
---|---|
authentication.method | 是 |
authentication.3ds.authenticationToken | * |
authentication.3ds.acsEci | 是 |
authentication.3ds.transactionId | 是 |
authentication.3ds2.transactionStatus | * |
authentication.3ds2.acsTransactionId | * |
authentication.3ds2.dsTransactionId | * |
authentication.3ds2.3dsServerTransactionId | * |
authentication.3ds2.3dsServerTransactionId | * |
authentication.3ds2.protocolVersion | * |
authentication.amount | 是 |
authentication.redirect.html | 是 |
authentication.time | 是 |
response.gatewayRecommendation | 是 |
transaction.type | 是 |
version | 是 |
timeOfRecord | 是 |
result | 是 |
response.debugInformation | * |
Authenticate Payer 请求示例
URL | https://testpg.mpgs.axisbank.com/api/rest/version/<version>/merchant/<merchant_ID>/order/<order_ID>/transaction/<transaction_ID> |
HTTP 方法 | PUT |
{ "authentication":{ "redirectResponseUrl":"<host>/merchantSimulator/jsp/simple/output.jsp" }, "correlationId":"test", "device": { "browser": "MOZILLA", "browserDetails": { "3DSecureChallengeWindowSize": "FULL_SCREEN", "acceptHeaders": "application/json", "colorDepth": 24, "javaEnabled": true, "language": "en-US", "screenHeight": 640, "screenWidth": 480, "timeZone": 273 }, "ipAddress": "127.0.0.1" }, "order":{ "amount":"100", "currency":"AUD" }, "sourceOfFunds":{ "provided":{ "card":{ "number":"<card_number>", "expiry":{ "month":"1", "year":"39" } } } }, "apiOperation": "AUTHENTICATE_PAYER" }
Authenticate Payer 响应示例 - 质询流
{ "authentication": { "3ds": { "transactionId": "a4d6ce7a-52ed-46c4-b1b8-0a64ffa3fdd8" }, "3ds2": { "3dsServerTransactionId": "cf976f0d-cb19-454f-a5b3-3cf09ae07e38", "acsTransactionId": "c8027c6a-94da-480d-9270-85098bc680d5", "directoryServerId": "A999999999", "dsTransactionId": "a4d6ce7a-52ed-46c4-b1b8-0a64ffa3fdd8", "methodSupported": "NOT_SUPPORTED", "protocolVersion": "2.1.0", "requestorId": "test40Field@S^2sfds2ID", "requestorName": "test40Field@S^2sfds2Name", "sdk": { "timeout": 400, "uiType": "TEXT" }, "transactionStatus": "C" }, "amount": 100.00, "method": "OUT_OF_BAND", "payerInteraction": "REQUIRED", "redirect": { "customizedHtml": { "3ds2": { "acsUrl": "<acs_url>", "cReq": "eyJ0aHJlZURTU2VydmVyVHJhbnNJRCI6ImNmOTc2ZjBkLWNiMTktNDU0Zi1hNWIzLTNjZjA5YWUwN2UzOCJ9" } }, "domainName": "<acs_domain>", "html": "<div id=\"threedsChallengeRedirect\" xmlns=\"http://www.w3.org/1999/html\"style=\" height: 100vh\"> <form id =\"threedsChallengeRedirectForm\" method=\"POST\" action=\"<acs_url>" target=\"challengeFrame\"> <input type=\"hidden\" name=\"creq\" value=\"eyJ0aHJlZURTU2VydmVyVHJhbnNJRCI6ImNmOTc2ZjBkLWNiMTktNDU0Zi1hNWIzLTNjZjA5YWUwN2UzOCJ9\" /> </form> <iframe id=\"challengeFrame\" name=\"challengeFrame\" width=\"100%\" height=\"100%\" ></iframe> <script id=\"authenticate-payer-script\"> var e=document.getElementById(\"threedsChallengeRedirectForm\"); if (e) { e.submit(); if (e.parentNode !== null) { e.parentNode.removeChild(e); } } </script> </div>" }, "time": "2022-06-24T07:04:34.836Z", "version": "3DS2" }, "correlationId": "test", "device": { "browser": "mozilla", "ipAddress": "127.0.0.1" }, "merchant": "TEST3DS12AUTH", "order": { "amount": 100.00, "authenticationStatus": "AUTHENTICATION_PENDING", "creationTime": "2022-06-24T07:03:43.780Z", "currency": "USD", "id": "TEST6", "lastUpdatedTime": "2022-06-24T07:04:34.795Z", "merchantCategoryCode": "1234", "status": "AUTHENTICATION_INITIATED", "totalAuthorizedAmount": 0, "totalCapturedAmount": 0, "totalRefundedAmount": 0, "valueTransfer": { "accountType": "NOT_A_TRANSFER" } }, "response": { "gatewayCode": "PENDING", "gatewayRecommendation": "PROCEED" }, "result": "PENDING", "sourceOfFunds": { "provided": { "card": { "brand": "MASTERCARD", "expiry": { "month": "1", "year": "39" }, "fundingMethod": "CREDIT", "number": "512345xxxxxx8212", "scheme": "MASTERCARD" } }, "type": "CARD" }, "timeOfLastUpdate": "2022-06-24T07:04:34.795Z", "timeOfRecord": "2022-06-24T07:03:43.780Z", "transaction": { "acquirer": { "merchantId": "123456" }, "amount": 100.00, "authenticationStatus": "AUTHENTICATION_PENDING", "currency": "USD", "id": "1", "type": "AUTHENTICATION" }, "version": "67" }
步骤 3: 在付款中使用身份验证结果
当 AUTHENTICATE PAYER
操作结果表明您可以继续付款 response.gatewayRecommendation=PROCEED
时,您可以发起 Authorize 或 PAY 操作。 除了标准字段外,您还必须提供以下字段:
order.id
: 使用与您在INITIATE AUTHENTICATION
和AUTHENTICATE PAYER
操作中提供的相同order.id
。authentication.transactionId
: 使用与您在INITIATE AUTHENTICATION
和AUTHENTICATE PAYER
操作中提供的相同transaction.id
。 您不需要在authentication
对象中包含任何字段,因为网关使用authentication.transactionId
来查找您要求网关执行身份验证时它存储的身份验证结果。 网关将需要的信息传送到收单行。
PAY 请求示例
URL | https://testpg.mpgs.axisbank.com/api/rest/version/<version>/merchant/<merchant_ID>/order/<order_ID>/transaction/<transaction_ID> |
HTTP 方法 | PUT |
{ "apiOperation":"PAY", "authentication":{ "transactionId":"<your_transaction_ID>" }, "order":{ "amount":"100", "currency":"AUD", "reference":"<your_order_ID>" }, "sourceOfFunds":{ "provided":{ "card":{ "number":"<card_number>", "expiry":{ "month":"1", "year":"39" } } }, "type":"CARD" }, "transaction":{ "reference":"<your_order_ID>" } }
PAY 响应示例
{ "authentication":{ "3ds":{ "acsEci":"02", "authenticationToken":"kHyn+7YFi1EUAREAAAAvNUe6Hv8=", "transactionId":"39c25b96-7bc3-4586-bee8-056479fed3af" }, "3ds2":{ "dsTransactionId":"39c25b96-7bc3-4586-bee8-056479fed3af", "protocolVersion":"2.1.0", "transactionStatus":"Y" }, "transactionId":"249213216", "version":"3DS2" }, "authorizationResponse":{ "posData":"1605S0100130", "transactionIdentifier":"TidTest" }, "device":{ "browser":"MOZILLA", "ipAddress":"127.0.0.1" }, "gatewayEntryPoint":"WEB_SERVICES_API", "merchant":"TEST_3DS2-1", "order":{ "amount":100.00, "authenticationStatus":"AUTHENTICATION_SUCCESSFUL", "chargeback":{ "amount":0, "currency":"AUD" }, "creationTime":"2021-04-13T02:11:06.102Z", "currency":"AUD", "id":"807a01b6-e6c8-4aa7-b8da-799bfff89496", "lastUpdatedTime":"2021-04-13T02:11:57.049Z", "merchantAmount":100.00, "merchantCategoryCode":"1234", "merchantCurrency":"AUD", "reference":"807a01b6-e6c8-4aa7-b8da-799bfff89496", "status":"CAPTURED", "totalAuthorizedAmount":100.00, "totalCapturedAmount":100.00, "totalRefundedAmount":0.00 }, "response":{ "acquirerCode":"00", "gatewayCode":"APPROVED" }, "result":"SUCCESS", "sourceOfFunds":{ "provided":{ "card":{ "brand":"MASTERCARD", "expiry":{ "month":"1", "year":"39" }, "fundingMethod":"CREDIT", "issuer":"<issuer>", "number":"512345xxxxxx0008", "scheme":"Mastercard", "storedOnFile":"NOT_STORED" } }, "type":"CARD" }, "timeOfLastUpdate":"2021-04-13T02:11:57.049Z", "timeOfRecord":"2021-04-13T02:11:56.973Z", "transaction":{ "acquirer":{ "batch":1, "id":"<acquirer_id>", "merchantId":"99554411" }, "amount":100.00, "authenticationStatus":"AUTHENTICATION_SUCCESSFUL", "authorizationCode":"028941", "currency":"AUD", "id":"1", "receipt":"1908266016", "reference":"807a01b6-e6c8-4aa7-b8da-799bfff89496", "source":"INTERNET", "stan":"496", "terminal":"1234", "type":"PAYMENT" }, "version":"60" }
常见问题
我是否可以将付款人身份验证 API 用作客户端 API?
您可以将付款人身份验证 API 用作服务器端 API,也可以将其用作您网站或付款人浏览器上的客户端 API。
- 客户端 API: 您必须首先建立身份验证通道,您的商家服务器必须在该通道中与网关服务器进行通信以在网关上创建会话。 创建会话后,您可以使用此会话并使用 3DS JavaScript API 或使用您自己的库,来对直接通过浏览器管理 3DS 集成流所需的所有后续 API 操作进行身份验证。
- 服务器端 API: 您必须执行管理直接从商家服务器到网关服务器的 3DS 集成流所需的全部操作。 您可以通过付款人身份验证 API 支持所有身份验证交易模式。
- 在“仅身份验证”模式下,使用
INITIATE AUTHENTICATION
和AUTHENTICATE PAYER
操作。仅身份验证: 执行 Initiate Authentication 和 Authenticate Payer。 - 在身份验证和付款交易模式下,使用
INITIATE AUTHENTICATION
、AUTHENTICATE PAYER
和 AUTHORIZE/PAY 操作。 - 在预身份验证付款交易模式下,使用来自外部提供商的身份验证详细信息执行 AUTHORIZE/PAY 操作。
- 在“仅身份验证”模式下,使用
有关 3D 验证常见问题的更多信息,请参阅常见问题。