- 集成指南
- 支持的功能(付款方式)
- 实施浏览器付款集成
- Open Banking Bank Transfer(国内)
Open Banking Bank Transfer(国内)
Open Banking Bank Transfer 是英国的付款人可以使用的一种付款方式,让他们可以从其银行账户使用直接在线转账来购买商品和服务或为之付款。 付款人被重定向到其可以发起即时银行转账的银行。 付款人可以完整查看交易情况,并且可以放心地进行交易,交易在一个安全可靠的环境中授权和完成。 通过使用“快速付款服务”,Open Banking Bank Transfer 可以提供近乎实时的付款和结算以及以下优点:
- 摩擦和放弃减少,可能有助于增加收入
- 减少客户纠纷,可能降低成本
- 可能减少欺诈
- 已针对 PSD2(支付口令修正案)、FCA(金融行为监管局)和其他法规要求作好准备
- 针对服务消费者的单一 API 体验,形成多态的银行生态系统
Open Banking Bank Transfer 当前仅支持使用 GBP 货币进行交易。
先决条件
要通过 <<paymentGateway>> 作为付款方式提供 Open Banking Bank Transfer:
- <<paymentServiceProvider>> 必须使用您在 PISP 上的账户详细信息在网关上配置您的商家配置文件。
- 建议您选择“通知”服务 (Webhook),以在付款成功时收到通知。
Open Banking Bank Transfer 集成
如果您使用自己的付款页,希望向付款人提供 Open Banking Bank Transfer 作为结账选项,则必须使用网关提供的 Open Banking JavaScript SDK (open-banking.min.js)。
请按照下面列出的集成步骤操作。
步骤 1: 创建会话
通过从您的服务器端应用程序提交 Create Session 请求来创建会话。 请将会话身份验证限制指定为 25。响应将返回一个会话 ID,在后续步骤中您必须使用此 ID 来引用此会话。
| URL | https://test.ibanke-commerce.nbg.gr/api/rest/version/63/merchant/your_gateway_merchant_ID/session |
| HTTP 方法 | POST |
{
"session":{
"authenticationLimit":25
}
}
步骤 2: 使用订单、交易和浏览器付款详细信息更新会话
通过从您的服务器端应用程序提交 Update Session 请求来更新会话,至少更新订单 ID、交易 ID、订单金额、货币和浏览器付款详细信息(操作、返回 URL)。 确保在后续配置 Open Banking SDK 和准备回调界面时使用相同的订单 ID 和交易 ID。
请注意,browserPayment.returnURL 是付款人在其银行的网站上完成付款后您希望付款人浏览器被重定向到的 URL。 无论付款成功与否,付款人都将被重定向到此 URL。 如果您未提供返回 URL,网关将无法将付款人浏览器重定向到您的站点。
| URL | https://test.ibanke-commerce.nbg.gr/api/rest/version/63/merchant/your_gateway_merchant_ID/session/your_session_ID |
| HTTP 方法 | PUT |
{
"order":{
"amount":"100.00",
"currency":"GBP",
"id":"1234567"
},
"transaction":{
"id":"98765432"
},
"browserPayment":{
"operation":"PAY",
"returnUrl":"https://example.com"
}
}
使用业务范围
如果您请求了具有不同应收账款的多个 Open Banking Bank Transfer 实例,则必须在 Update Session 请求中包含 lineOfBusiness 字段。 作为先决条件,必须根据应收账款名称和详细信息将您的商家配置文件配置为支持多个业务范围。 每个业务范围可以有不同的付款参数,如银行账户。
例如,lineOfBusiness = TICKET_SALES 可以有与 lineOfBusiness = MERCHANDISING 不同的银行账户。 如果您的配置文件中的业务范围为“null”,则不要在 lineOfBusiness 字段中输入任何值。
根据您的商家配置文件设置,在配置 Open Banking 交互以使用 Open Banking JavaScript SDK 时,可能需要使用 lineOfBusiness 值。
步骤 3: 在您的付款页中包含 Open Banking JavaScript SDK
通过在 head 元素内添加 script 元素,在付款页包含网关提供的 Open Banking JavaScript SDK (open-banking.min.js)。 这会将 OpenBanking 对象放入窗口名称空间。 另外,在 head 元素内添加 meta 元素。 这将在所有 Web 和移动浏览器中相应地扩展 Open Banking SDK。 确保您已为 Open Banking 完成设置。
<script src="https://test.ibanke-commerce.nbg.gr/static/open-banking/1.0.0/open-banking.min.js"></script> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
步骤 4: 配置开放银行交互
加载付款页时,通过调用 OpenBanking.configure() 方法发起 Open Banking 交互。 此方法对于页面加载应该只调用一次。
var config = {
merchantId: '<your_gateway_merchant_ID>', //required
merchantName: '<your_merchant_name>',//required for display purpose
amount: '<amount>',//required for display purpose
orderId: '<order_ID>',//required and must match the value provided in Step 2
transactionId: '<transaction_ID>',//required and must match the value provided in Step 2
sessionId: '<your_session_ID>',//required
wsVersion: '',//optional, defaults to 63, when provided must match the version provided in Step 1 and 2
locale: //optional,
};
OpenBanking.configure(config, function (response) // Successful response sample //{status: 'SUCCESS', explanation: 'Configured successfully!'};
console.log(response);
});
商家详细信息
merchantId 是必需的,让网关可以正确确定您的付款选项。
merchantName 字段将被提交到 Open Banking 服务器。 它可能在 Open Banking 交互期间显示给付款人。 提供您的交易名称,即付款人已知的名称。
Version
版本默认设置为 63。 此版本必须与您提交 Create Session 请求时使用的版本匹配。
回调
使用 callback 参数定义要在 OpenBanking.configure() 完成后调用的操作。 例如,您可能想要在方法成功时进行记录。
var callbackFunction = function(response) {
// Successful response sample
//{status: 'SUCCESS', explanation: 'Configured successfully!'};
console.log(response);
};
OpenBanking.configure(config, callbackFunction);
OpenBanking.configure() 调用可能返回以下错误响应。 返回错误时,请勿继续进行下一步。 请向付款人提供另一种付款方式。
| response.cause | resp.explanation | 所需操作 |
|---|---|---|
| 错误 | 缺少参数: configure() 方法的所有必需参数有 Merchant ID、Merchant Name、Merchant URL、Hosted Session ID 和回调函数。 |
修复您的集成。 您必须提供所有强制请求字段。 |
| 错误 | 回调必须是一个函数。 | 修复您的集成。 |
| 错误 | API 版本必须为 MIN_VERSION 或更高版本。 |
修复您的集成。 将 wsVersion 设置为 63。 |
| 错误 | interaction locale 格式错误。 |
请提供正确格式的区域设置,如 It_LT、It、It-LT。 |
步骤 5: 启动 Open Banking UI
如果 OpenBanking.configure() 成功,则通过调用 OpenBanking.launchUI() 方法启动 Open Banking UI。
请确保添加 launch UI () 函数无法收到 PAYMENT_OPTIONS_INQUIRY 请求的响应或 API 超时时发生的回调错误的详细信息。 当您收到 JavaScript SDK 页面和回调错误时,您需要负责更新付款人。
OpenBanking.launchUI();
<<checkout>> 集成让您可以通过 <<paymentGateway>> 托管和显示的交互来从付款人处收集付款详细信息。
使用 PayFrom Bank 支付的 Open Banking 付款方式及其徽标将被添加到 Hosted Checkout 付款页。 您可以看到支持 Open Banking 的银行列表,然后选择银行继续进行付款。
从 API 版本 64 开始,在 <<paymentServiceProvider>> 为您启用并配置了 Open Banking 后,它会自动成为付款方式之一。
检索交易详细信息
您可以使用以下选项来检索 Open Banking 交互的交易详细信息:
- Retrieve Order 或 Retrieve Transaction 操作
- <<merchantUI>> 中的订单和交易搜索: 您可以使用付款收据上提供给付款人的参考号查找交易。 此参考号还会显示在您和付款人的银行账单上,让您可以进一步验证交易。
了解订单和交易状态
下表概括了发起 Open Banking Bank Transfer 付款后可能遇到的情景,并显示了相应的交易响应代码和订单状态。 它提供了应在何时向付款人发货或是否应等待 Webhook 通知以接收该交易的最新状态的指南。 请注意,您需要单独设置 Webhook 通知,或者必须在向付款人发货前使用前述选项轮询网关来检查最新的交易状态。
| 交易网关响应代码 | 订单状态 | 描述 |
|---|---|---|
| response.gatewayCode = SUBMITTED | status= INITIATED | Open Banking 交易已提交到 ASPSP;尚未发起付款。 到目前为止不要发货。 |
| response.gatewayCode = CANCELLED | status= FAILED | Open Banking 交易在处理过程中被付款人中止;在这种情况下,不会发起或结算付款。 不要为此订单发货。 |
| response.gatewayCode = TIMED_OUT | status= FAILED | Open Banking 交易在处理过程中超时;在这种情况下,不会发起或结算付款。 不要为此订单发货。 |
| response.gatewayCode = NOT_SUPPORTED | status= FAILED | Open Banking 交易在处理过程中被 ASPSP 拒绝;在这种情况下,不会发起或结算付款。 不要为此订单发货。 |
| response.gatewayCode = INSUFFICIENT_FUNDS | status= FAILED | Open Banking 交易在处理过程中由于付款人账户中的资金不足被 ASPSP 拒绝;在这种情况下,不会发起或结算付款。 不要为此订单发货。 |
| response.gatewayCode = DECLINED | status= FAILED | Open Banking 交易在处理过程中被 ASPSP 拒绝;在这种情况下,不会发起或结算付款。 不要为此订单发货。 |
| response.gatewayCode = APPROVED | status= CAPTURED | Open Banking 交易被 ASPSP 批准,此订单的结算已完成。 |
| response.gatewayCode = PENDING | status= CAPTURED | Open Banking 交易被 ASPSP 批准,但此订单的结算正在等待处理。 |
| response.gatewayCode = AUTHENTICATION_FAILED | Status = FAILED | Open Banking 交易在处理过程中由于付款人提供的身份验证详细信息无效被 ASPSP 拒绝;在这种情况下,不会发起或结算付款。 不要为此订单发货。 |
示例
这里是一个显示已提交的 Open Banking 交互的 Retrieve Transaction 响应的示例 (response.gatewayCode = SUBMITTED)
{
"amount":82113.13,
"chargeback":{
"amount":0,
"currency":"GBP"
},
"creationTime":"2020-08-17T09:35:27.250Z",
"currency":"GBP",
"customer":{
"email":"John@example.com"
},
"device":{
"browser":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36"
},
"id":"992608474",
"lastUpdatedTime":"2020-08-17T09:36:04.146Z",
"lineOfBusiness":"AIR_TICKETS",
"merchant":"TESTMERCHANT1",
"merchantAmount":82113.13,
"merchantCurrency":"GBP",
"reference":"TEST-SUCCEED",
"result":"SUCCESS",
"shipping":{
"address":{
"city":"Shipsville",
"country":"GBR",
"postcodeZip":"EH67DX",
"stateProvince":"Scotland",
"street":"2ShippingHeights",
"street2":"ShipsDrive"
},
"contact":{
"email":"John@example.com",
"firstName":"John",
"lastName":"Doe"
}
},
"sourceOfFunds":{
"provided":{
"openBankingBankTransfer":{
"aspspId":"12345XXX-XXXX-4156-XXXX-f6eeef0478cf"
}
},
"type":"OPEN_BANKING_BANK_TRANSFER"
},
"status":"INITIATED",
"totalAuthorizedAmount":0,
"totalCapturedAmount":0,
"totalRefundedAmount":0,
"transaction":
{
"browserPayment":{
"interaction":{
"status":"RETURNED_TO_MERCHANT",
"timeInitiated":"2020-08-17T09:35:27.272Z",
"timeRedirected":"2020-08-17T09:35:59.967Z",
"timeReturned":"2020-08-17T09:36:04.061Z"
},
"operation":"PAY",
"redirectUrl":"<hostname>/bpui/ob/out/BP-06f552c44de094aca21ee0abdf82303b",
"returnUrl":"<hostname>/apmDemoApp/complete.html"
},
"customer":{
"email":"John@example.com"
},
"device":{
"browser":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36"
},
"gatewayEntryPoint":"WEB_SERVICES_API",
"lineOfBusiness":"AIR_TICKETS",
"merchant":" TESTMERCHANT1",
"order":{
"amount":82113.13,
"chargeback":{
"amount":0,
"currency":"GBP"
},
"creationTime":"2020-08-17T09:35:27.250Z",
"currency":"GBP",
"id":"992608474",
"lastUpdatedTime":"2020-08-17T09:36:04.146Z",
"merchantAmount":82113.13,
"merchantCurrency":"GBP",
"reference":"TEST-SUCCEED",
"status":"INITIATED",
"totalAuthorizedAmount":0,
"totalCapturedAmount":0,
"totalRefundedAmount":0
},
"response":{
"gatewayCode":"SUBMITTED"
},
"result":"SUCCESS",
"shipping":{
"address":{
"city":"Shipsville",
"country":"GBR",
"postcodeZip":"EH67DX",
"stateProvince":"Scotland",
"street":"2ShippingHeights",
"street2":"ShipsDrive"
},
"contact":{
"email":"John@gmail.com",
"firstName":"John",
"lastName":"Doe"
}
},
"sourceOfFunds":{
"provided":{
"openBankingBankTransfer":{
"aspspId":"12345XXX-XXXX-4156-XXXX-f6eeef0478cf"
}
},
"type":"OPEN_BANKING_BANK_TRANSFER"
},
"timeOfLastUpdate":"2020-08-17T09:36:04.146Z",
"timeOfRecord":"2020-08-17T09:35:27.270Z",
"transaction":{
"acquirer":{
"id":"OPEN_BANKING",
"merchantId":"Lloyds"
},
"amount":82113.13,
"currency":"GBP",
"id":"106172951",
"receipt":"162c0482b774b3e1",
"source":"INTERNET",
"stan":"0",
"type":"PAYMENT"
},
"version":"<latest_gateway_version>"
}
}
这里是一个显示已批准的 Open Banking 交互的 Retrieve Transaction 响应的示例 (response.gatewayCode = APPROVED)
{
"amount":123.46,
"chargeback":{
"amount":0,
"currency":"GBP"
},
"creationTime":"2020-06-24T01:01:09.584Z",
"currency":"GBP",
"device":{
"browser":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"
},
"id":"86f293d3-1eb5-4003-9f30-7d9fbe7f1384",
"item":[
{
"brand":"MC",
"category":"NA",
"detail":{
"unitDiscountRate":0,
"unitTaxRate":0
},
"name":"item0",
"quantity":1,
"sku":"sku",
"unitDiscountAmount":3,
"unitPrice":21,
"unitTaxAmount":0.47
},
{
"detail":{
"unitTaxRate":0
},
"name":"item1",
"quantity":2,
"unitDiscountAmount":2,
"unitPrice":47,
"unitTaxAmount":5
}
],
"itemAmount":115,
"lastUpdatedTime":"2020-06-24T01:01:46.769Z",
"merchant":"TESTMERCHANT1",
"merchantAmount":123.46,
"merchantCurrency":"GBP",
"reference":"sample",
"result":"SUCCESS",
"risk":{
"response":{
"gatewayCode":"ACCEPTED"
}
},
"shipping":{
"address":{
"city":"London",
"company":"ABC",
"country":"GBR",
"postcodeZip":"90001",
"stateProvince":"ENG",
"street":"2nd Main",
"street2":"lane 2"
},
"contact":{
"email":"John@gmail.com",
"firstName":"John",
"lastName":"Doe",
"mobilePhone":"9999999999",
"phone":"9999999999"
},
"method":"SAME_DAY"
},
"shippingAndHandlingAmount":4.99,
"sourceOfFunds":{
"provided":{
"openBankingBankTransfer":{
"aspspId":"123456-xxxx-4dd4-b4f2-12234vgb43bff "
}
},
"type":"OPEN_BANKING_BANK_TRANSFER"
},
"status":"CAPTURED",
"taxAmount":10.47,
"totalAuthorizedAmount":123.46,
"totalCapturedAmount":123.46,
"totalRefundedAmount":0,
"transaction":
{
"browserPayment":{
"interaction":{
"status":"COMPLETED",
"timeCompleted":"2020-06-24T01:01:10.007Z",
"timeInitiated":"2020-06-24T01:01:09.599Z",
"timeRedirected":"2020-06-24T01:01:09.705Z",
"timeReturned":"2020-06-24T01:01:09.991Z"
},
"operation":"PAY",
"redirectUrl":"<hostname>/bpui/ob/out/BP-9099d773edb0e2d3d1e86c4bd9d9b867",
"returnUrl":"<hostname>/api/documentation/integrationGuidelines/index.html"
},
"device":{
"browser":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"
},
"gatewayEntryPoint":"WEB_SERVICES_API",
"merchant":"TESTMERCHANT1",
"order":{
"amount":123.46,
"chargeback":{
"amount":0,
"currency":"GBP"
},
"creationTime":"2020-06-24T01:01:09.584Z",
"currency":"GBP",
"id":"86f293d3-1eb5-4003-9f30-7d9fbe7f1384",
"item":[
{
"brand":"MC",
"category":"NA",
"detail":{
"unitDiscountRate":0,
"unitTaxRate":0
},
"name":"item0",
"quantity":1,
"sku":"sku",
"unitDiscountAmount":3,
"unitPrice":21,
"unitTaxAmount":0.47
},
{
"detail":{
"unitTaxRate":0
},
"name":"item1",
"quantity":2,
"unitDiscountAmount":2,
"unitPrice":47,
"unitTaxAmount":5
}
],
"itemAmount":115,
"lastUpdatedTime":"2020-06-24T01:01:46.769Z",
"merchantAmount":123.46,
"merchantCurrency":"GBP",
"reference":"sample",
"shippingAndHandlingAmount":4.99,
"status":"CAPTURED",
"taxAmount":10.47,
"totalAuthorizedAmount":123.46,
"totalCapturedAmount":123.46,
"totalRefundedAmount":0
},
"response":{
"gatewayCode":"APPROVED"
},
"result":"SUCCESS",
"risk":{
"response":{
"gatewayCode":"ACCEPTED"
}
},
"shipping":{
"address":{
"city":"London",
"company":"ABC",
"country":"GBR",
"postcodeZip":"90001",
"stateProvince":"ENG",
"street":"2nd Main",
"street2":"lane 2"
},
"contact":{
"email":"John@gmail.com",
"firstName":"John",
"lastName":"Doe",
"mobilePhone":"9999999999",
"phone":"9999999999"
},
"method":"SAME_DAY"
},
"sourceOfFunds":{
"provided":{
"openBankingBankTransfer":{
"aspspId":"123456-xxxx-4dd4-b4f2-12234vgb43bff "
}
},
"type":"OPEN_BANKING_BANK_TRANSFER"
},
"timeOfLastUpdate":"2020-06-24T01:01:46.769Z",
"timeOfRecord":"2020-06-24T01:01:09.596Z",
"transaction":{
"acquirer":{
"id":"OPEN_BANKING",
"merchantId":"Lloyds"
},
"amount":123.46,
"currency":"GBP",
"id":"1",
"reference":"sample",
"source":"INTERNET",
"stan":"0",
"type":"PAYMENT"
},
"version":"<latest_gateway_version>"
}
}
这里是一个显示待处理 Open Banking 交互的 Retrieve Transaction 响应的示例 (response.gatewayCode = PENDING)
{
"amount":123.46,
"chargeback":{
"amount":0,
"currency":"GBP"
},
"creationTime":"2020-06-26T07:09:16.846Z",
"currency":"GBP",
"customer":{
"email":"johmith@example.com"
},
"device":{
"browser":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36"
},
"id":"888190454",
"item":[
{
"detail":{
"unitTaxRate":0
},
"name":"Spud",
"quantity":1,
"unitDiscountAmount":3,
"unitPrice":21,
"unitTaxAmount":0.47
},
{
"detail":{
"unitTaxRate":0
},
"name":"item2",
"quantity":2,
"unitDiscountAmount":2,
"unitPrice":47,
"unitTaxAmount":5
}
],
"itemAmount":115,
"lastUpdatedTime":"2020-06-26T07:10:57.230Z",
"merchant":"TESTMERCHANT1",
"merchantAmount":123.46,
"merchantCurrency":"GBP",
"reference":"TEST-SUCCEED",
"result":"SUCCESS",
"risk":{
"response":{
"gatewayCode":"ACCEPTED"
}
},
"shipping":{
"address":{
"city":"Shipsville",
"country":"GBR",
"postcodeZip":"EH67DX",
"stateProvince":"Scotland",
"street":"2ShippingHeights",
"street2":"ShipsDrive"
},
"contact":{
"email":"johnsmith@example.com",
"firstName":"Shipfirst",
"lastName":"McShiplast"
}
},
"shippingAndHandlingAmount":4.99,
"sourceOfFunds":{
"provided":{
"openBankingBankTransfer":{
"aspspId":"123456-xxxx-4dd4-b4f2-12234vgb43bff"
}
},
"type":"OPEN_BANKING_BANK_TRANSFER"
},
"status":"CAPTURED",
"taxAmount":10.47,
"totalAuthorizedAmount":123.46,
"totalCapturedAmount":123.46,
"totalRefundedAmount":0,
"transaction":[
{
"browserPayment":{
"interaction":{
"status":"RETURNED_TO_MERCHANT",
"timeInitiated":"2020-06-26T07:09:16.864Z",
"timeRedirected":"2020-06-26T07:10:53.329Z",
"timeReturned":"2020-06-26T07:11:03.827Z"
},
"operation":"PAY",
"redirectUrl":"<hostname>/bpui/ob/out/BP-65318d39a0c3b8000f07b7939561b819",
"returnUrl":"<hostname>/apmDemoApp/complete.html"
},
"customer":{
"email":"johmith@example.com"
},
"device":{
"browser":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36"
},
"gatewayEntryPoint":"WEB_SERVICES_API",
"merchant":"TESTMERCHANT1",
"order":{
"amount":123.46,
"chargeback":{
"amount":0,
"currency":"GBP"
},
"creationTime":"2020-06-26T07:09:16.846Z",
"currency":"GBP",
"id":"888190454",
"item":[
{
"detail":{
"unitTaxRate":0
},
"name":"Spud",
"quantity":1,
"unitDiscountAmount":3,
"unitPrice":21,
"unitTaxAmount":0.47
},
{
"detail":{
"unitTaxRate":0
},
"name":"item2",
"quantity":2,
"unitDiscountAmount":2,
"unitPrice":47,
"unitTaxAmount":5
}
],
"itemAmount":115,
"lastUpdatedTime":"2020-06-26T07:10:57.230Z",
"merchantAmount":123.46,
"merchantCurrency":"GBP",
"reference":"TEST-SUCCEED",
"shippingAndHandlingAmount":4.99,
"status":"CAPTURED",
"taxAmount":10.47,
"totalAuthorizedAmount":123.46,
"totalCapturedAmount":123.46,
"totalRefundedAmount":0
},
"response":{
"gatewayCode":"PENDING"
},
"result":"PENDING",
"risk":{
"response":{
"gatewayCode":"ACCEPTED"
}
},
"shipping":{
"address":{
"city":"Shipsville",
"country":"GBR",
"postcodeZip":"EH67DX",
"stateProvince":"Scotland",
"street":"2ShippingHeights",
"street2":"ShipsDrive"
},
"contact":{
"email":"johnsmith@example.com",
"firstName":"Shipfirst",
"lastName":"McShiplast"
}
},
"sourceOfFunds":{
"provided":{
"openBankingBankTransfer":{
"aspspId":"123456-xxxx-4dd4-b4f2-12234vgb43bff"
}
},
"type":"OPEN_BANKING_BANK_TRANSFER"
},
"timeOfLastUpdate":"2020-06-26T07:10:57.230Z",
"timeOfRecord":"2020-06-26T07:09:16.861Z",
"transaction":{
"acquirer":{
"id":"OPEN_BANKING",
"merchantId":"Lloyds"
},
"amount":123.46,
"currency":"GBP",
"id":"148341288",
"source":"INTERNET",
"stan":"0",
"type":"PAYMENT"
},
"version":"<latest_gateway_version>"
}
}
这里是一个显示 response.gatewayCode = NOT_SUPPORTED 的 Open Banking 交互的 Retrieve Transaction 响应的示例
{
"amount":123.46,
"chargeback":{
"amount":0,
"currency":"GBP"
},
"creationTime":"2020-06-11T07:04:16.222Z",
"currency":"GBP",
"device":{
"browser":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"
},
"id":"575d3ae0-2b28-4a68-892e-688ae7e3d344",
"item":[
{
"brand":"MC",
"category":"NA",
"detail":{
"unitDiscountRate":0,
"unitTaxRate":0
},
"name":"item0",
"quantity":1,
"sku":"sku",
"unitDiscountAmount":3,
"unitPrice":21,
"unitTaxAmount":0.47
},
{
"detail":{
"unitTaxRate":0
},
"name":"item1",
"quantity":2,
"unitDiscountAmount":2,
"unitPrice":47,
"unitTaxAmount":5
}
],
"itemAmount":115,
"lastUpdatedTime":"2020-06-11T07:04:03.364Z",
"merchant":"TESTMERCHANT1",
"merchantAmount":123.46,
"merchantCurrency":"GBP",
"reference":"sample",
"result":"SUCCESS",
"risk":{
"response":{
"gatewayCode":"ACCEPTED"
}
},
"shipping":{
"address":{
"city":"London",
"company":"ABC",
"country":"GBR",
"postcodeZip":"90001",
"stateProvince":"ENG",
"street":"2nd Main",
"street2":"lane 2"
},
"contact":{
"email":"John@gmail.com",
"firstName":"John",
"lastName":"Doe",
"mobilePhone":"9999999999",
"phone":"9999999999"
},
"method":"SAME_DAY"
},
"shippingAndHandlingAmount":4.99,
"sourceOfFunds":{
"provided":{
"openBankingBankTransfer":{
"aspspId":"123456-xxxx-4dd4-b4f2-12234vgb43bff"
}
},
"type":"OPEN_BANKING_BANK_TRANSFER"
},
"status":"FAILED",
"taxAmount":10.47,
"totalAuthorizedAmount":0,
"totalCapturedAmount":0,
"totalRefundedAmount":0,
"transaction":
{
"browserPayment":{
"interaction":{
"status":"COMPLETED",
"timeCompleted":"2020-06-11T07:04:16.708Z",
"timeInitiated":"2020-06-11T07:04:16.234Z",
"timeRedirected":"2020-06-11T07:04:15.257Z",
"timeReturned":"2020-06-11T07:04:16.679Z"
},
"operation":"PAY",
"redirectUrl":"<hostname>/bpui/ob/out/BP-bcd3a9b079f6a66581c3429dcbec386b",
"returnUrl":"<hostname>/api/documentation/integrationGuidelines/index.html"
},
"device":{
"browser":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"
},
"gatewayEntryPoint":"WEB_SERVICES_API",
"merchant":"TESTMERCHANT1",
"order":{
"amount":123.46,
"chargeback":{
"amount":0,
"currency":"GBP"
},
"creationTime":"2020-06-11T07:04:16.222Z",
"currency":"GBP",
"id":"575d3ae0-2b28-4a68-892e-688ae7e3d344",
"item":[
{
"brand":"MC",
"category":"NA",
"detail":{
"unitDiscountRate":0,
"unitTaxRate":0
},
"name":"item0",
"quantity":1,
"sku":"sku",
"unitDiscountAmount":3,
"unitPrice":21,
"unitTaxAmount":0.47
},
{
"detail":{
"unitTaxRate":0
},
"name":"item1",
"quantity":2,
"unitDiscountAmount":2,
"unitPrice":47,
"unitTaxAmount":5
}
],
"itemAmount":115,
"lastUpdatedTime":"2020-06-11T07:04:03.364Z",
"merchantAmount":123.46,
"merchantCurrency":"GBP",
"reference":"sample",
"shippingAndHandlingAmount":4.99,
"status":"FAILED",
"taxAmount":10.47,
"totalAuthorizedAmount":0,
"totalCapturedAmount":0,
"totalRefundedAmount":0
},
"response":{
"gatewayCode":"NOT_SUPPORTED"
},
"result":"FAILURE",
"risk":{
"response":{
"gatewayCode":"ACCEPTED"
}
},
"shipping":{
"address":{
"city":"London",
"company":"ABC",
"country":"GBR",
"postcodeZip":"90001",
"stateProvince":"ENG",
"street":"2nd Main",
"street2":"lane 2"
},
"contact":{
"email":"John@gmail.com",
"firstName":"John",
"lastName":"Doe",
"mobilePhone":"9999999999",
"phone":"9999999999"
},
"method":"SAME_DAY"
},
"sourceOfFunds":{
"provided":{
"openBankingBankTransfer":{
"aspspId":"123456-xxxx-4dd4-b4f2-12234vgb43bff"
}
},
"type":"OPEN_BANKING_BANK_TRANSFER"
},
"timeOfLastUpdate":"2020-06-11T07:04:03.364Z",
"timeOfRecord":"2020-06-11T07:04:16.232Z",
"transaction":{
"acquirer":{
"id":"OPEN_BANKING",
"merchantId":"Lloyds"
},
"amount":123.46,
"currency":"GBP",
"id":"1",
"reference":"sample",
"source":"INTERNET",
"stan":"0",
"type":"PAYMENT"
},
"version":"<latest_gateway_version>"
}
}
这里是一个显示超时 Open Banking 交互的 Retrieve Transaction 响应的示例 (response.gatewayCode = TIMED_OUT)
{
"amount":123.46,
"chargeback":{
"amount":0,
"currency":"GBP"
},
"creationTime":"2020-06-26T07:17:48.608Z",
"currency":"GBP",
"customer":{
"email":"johmith@example.com"
},
"device":{
"browser":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36"
},
"id":"246119218",
"item":[
{
"detail":{
"unitTaxRate":0
},
"name":"Spud",
"quantity":1,
"unitDiscountAmount":3,
"unitPrice":21,
"unitTaxAmount":0.47
},
{
"detail":{
"unitTaxRate":0
},
"name":"item2",
"quantity":2,
"unitDiscountAmount":2,
"unitPrice":47,
"unitTaxAmount":5
}
],
"itemAmount":115,
"lastUpdatedTime":"2020-06-26T07:18:27.894Z",
"merchant":"TESTMERCHANT1",
"merchantAmount":123.46,
"merchantCurrency":"GBP",
"reference":"TEST-SUCCEED",
"result":"SUCCESS",
"risk":{
"response":{
"gatewayCode":"ACCEPTED"
}
},
"shipping":{
"address":{
"city":"Shipsville",
"country":"GBR",
"postcodeZip":"EH67DX",
"stateProvince":"Scotland",
"street":"2ShippingHeights",
"street2":"ShipsDrive"
},
"contact":{
"email":"johnsmith@example.com",
"firstName":"Shipfirst",
"lastName":"McShiplast"
}
},
"shippingAndHandlingAmount":4.99,
"sourceOfFunds":{
"provided":{
"openBankingBankTransfer":{
"aspspId":"123456-xxxx-4dd4-b4f2-12234vgb43bff"
}
},
"type":"OPEN_BANKING_BANK_TRANSFER"
},
"status":"FAILED",
"taxAmount":10.47,
"totalAuthorizedAmount":0,
"totalCapturedAmount":0,
"totalRefundedAmount":0,
"transaction":
{
"browserPayment":{
"interaction":{
"status":"COMPLETED",
"timeCompleted":"2020-06-26T07:18:39.485Z",
"timeInitiated":"2020-06-26T07:17:49.654Z",
"timeRedirected":"2020-06-26T07:18:18.595Z",
"timeReturned":"2020-06-26T07:18:39.439Z"
},
"operation":"PAY",
"redirectUrl":"<hostname>/bpui/ob/out/BP-bd0d14660fc5bd0a98578a73e83713cd",
"returnUrl":"<hostname>/apmDemoApp/complete.html"
},
"customer":{
"email":"johmith@example.com"
},
"device":{
"browser":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36"
},
"gatewayEntryPoint":"WEB_SERVICES_API",
"merchant":"TESTMERCHANT1",
"order":{
"amount":123.46,
"chargeback":{
"amount":0,
"currency":"GBP"
},
"creationTime":"2020-06-26T07:17:48.608Z",
"currency":"GBP",
"id":"246119218",
"item":[
{
"detail":{
"unitTaxRate":0
},
"name":"Spud",
"quantity":1,
"unitDiscountAmount":3,
"unitPrice":21,
"unitTaxAmount":0.47
},
{
"detail":{
"unitTaxRate":0
},
"name":"item2",
"quantity":2,
"unitDiscountAmount":2,
"unitPrice":47,
"unitTaxAmount":5
}
],
"itemAmount":115,
"lastUpdatedTime":"2020-06-26T07:18:27.894Z",
"merchantAmount":123.46,
"merchantCurrency":"GBP",
"reference":"TEST-SUCCEED",
"shippingAndHandlingAmount":4.99,
"status":"FAILED",
"taxAmount":10.47,
"totalAuthorizedAmount":0,
"totalCapturedAmount":0,
"totalRefundedAmount":0
},
"response":{
"gatewayCode":"TIMED_OUT"
},
"result":"FAILURE",
"risk":{
"response":{
"gatewayCode":"ACCEPTED"
}
},
"shipping":{
"address":{
"city":"Shipsville",
"country":"GBR",
"postcodeZip":"EH67DX",
"stateProvince":"Scotland",
"street":"2ShippingHeights",
"street2":"ShipsDrive"
},
"contact":{
"email":"johnsmith@example.com",
"firstName":"Shipfirst",
"lastName":"McShiplast"
}
},
"sourceOfFunds":{
"provided":{
"openBankingBankTransfer":{
"aspspId":"123456-xxxx-4dd4-b4f2-12234vgb43bff"
}
},
"type":"OPEN_BANKING_BANK_TRANSFER"
},
"timeOfLastUpdate":"2020-06-26T07:18:27.894Z",
"timeOfRecord":"2020-06-26T07:17:49.641Z",
"transaction":{
"acquirer":{
"id":"OPEN_BANKING",
"merchantId":"Lloyds"
},
"amount":123.46,
"currency":"GBP",
"id":"354434408",
"source":"INTERNET",
"stan":"0",
"type":"PAYMENT"
},
"version":"<latest_gateway_version>"
}
}
这里是一个显示 response.gatewayCode = INSUFFICIENT_FUNDS 的 Open Banking 交互的 Retrieve Transaction 响应的示例
{
"amount":123.46,
"chargeback":{
"amount":0,
"currency":"GBP"
},
"creationTime":"2020-06-11T07:04:25.661Z",
"currency":"GBP",
"device":{
"browser":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"
},
"id":"38de9737-f394-484e-86ce-a6df45416a61",
"item":[
{
"brand":"MC",
"category":"NA",
"detail":{
"unitDiscountRate":0,
"unitTaxRate":0
},
"name":"item0",
"quantity":1,
"sku":"sku",
"unitDiscountAmount":3,
"unitPrice":21,
"unitTaxAmount":0.47
},
{
"detail":{
"unitTaxRate":0
},
"name":"item1",
"quantity":2,
"unitDiscountAmount":2,
"unitPrice":47,
"unitTaxAmount":5
}
],
"itemAmount":115,
"lastUpdatedTime":"2020-06-11T07:04:13.889Z",
"merchant":"TESTMERCHANT1",
"merchantAmount":123.46,
"merchantCurrency":"GBP",
"reference":"sample",
"result":"SUCCESS",
"risk":{
"response":{
"gatewayCode":"ACCEPTED"
}
},
"shipping":{
"address":{
"city":"London",
"company":"ABC",
"country":"GBR",
"postcodeZip":"90001",
"stateProvince":"ENG",
"street":"2nd Main",
"street2":"lane 2"
},
"contact":{
"email":"John@gmail.com",
"firstName":"John",
"lastName":"Doe",
"mobilePhone":"9999999999",
"phone":"9999999999"
},
"method":"SAME_DAY"
},
"shippingAndHandlingAmount":4.99,
"sourceOfFunds":{
"provided":{
"openBankingBankTransfer":{
"aspspId":"123456-xxxx-4dd4-b4f2-12234vgb43bff"
}
},
"type":"OPEN_BANKING_BANK_TRANSFER"
},
"status":"FAILED",
"taxAmount":10.47,
"totalAuthorizedAmount":0,
"totalCapturedAmount":0,
"totalRefundedAmount":0,
"transaction":
{
"browserPayment":{
"interaction":{
"status":"COMPLETED",
"timeCompleted":"2020-06-11T07:04:26.110Z",
"timeInitiated":"2020-06-11T07:04:25.673Z",
"timeRedirected":"2020-06-11T07:04:25.798Z",
"timeReturned":"2020-06-11T07:04:26.079Z"
},
"operation":"PAY",
"redirectUrl":"<hostname>/bpui/ob/out/BP-dc04c5638e296c6fc3b2905a0607bbf9",
"returnUrl":"<hostname>/api/documentation/integrationGuidelines/index.html"
},
"device":{
"browser":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"
},
"gatewayEntryPoint":"WEB_SERVICES_API",
"merchant":"TESTMERCHANT1",
"order":{
"amount":123.46,
"chargeback":{
"amount":0,
"currency":"GBP"
},
"creationTime":"2020-06-11T07:04:25.661Z",
"currency":"GBP",
"id":"38de9737-f394-484e-86ce-a6df45416a61",
"item":[
{
"brand":"MC",
"category":"NA",
"detail":{
"unitDiscountRate":0,
"unitTaxRate":0
},
"name":"item0",
"quantity":1,
"sku":"sku",
"unitDiscountAmount":3,
"unitPrice":21,
"unitTaxAmount":0.47
},
{
"detail":{
"unitTaxRate":0
},
"name":"item1",
"quantity":2,
"unitDiscountAmount":2,
"unitPrice":47,
"unitTaxAmount":5
}
],
"itemAmount":115,
"lastUpdatedTime":"2020-06-11T07:04:13.889Z",
"merchantAmount":123.46,
"merchantCurrency":"GBP",
"reference":"sample",
"shippingAndHandlingAmount":4.99,
"status":"FAILED",
"taxAmount":10.47,
"totalAuthorizedAmount":0,
"totalCapturedAmount":0,
"totalRefundedAmount":0
},
"response":{
"gatewayCode":"INSUFFICIENT_FUNDS"
},
"result":"FAILURE",
"risk":{
"response":{
"gatewayCode":"ACCEPTED"
}
},
"shipping":{
"address":{
"city":"London",
"company":"ABC",
"country":"GBR",
"postcodeZip":"90001",
"stateProvince":"ENG",
"street":"2nd Main",
"street2":"lane 2"
},
"contact":{
"email":"John@gmail.com",
"firstName":"John",
"lastName":"Doe",
"mobilePhone":"9999999999",
"phone":"9999999999"
},
"method":"SAME_DAY"
},
"sourceOfFunds":{
"provided":{
"openBankingBankTransfer":{
"aspspId":"123456-xxxx-4dd4-b4f2-12234vgb43bff"
}
},
"type":"OPEN_BANKING_BANK_TRANSFER"
},
"timeOfLastUpdate":"2020-06-11T07:04:13.889Z",
"timeOfRecord":"2020-06-11T07:04:25.670Z",
"transaction":{
"acquirer":{
"id":"OPEN_BANKING",
"merchantId":"Lloyds"
},
"amount":123.46,
"currency":"GBP",
"id":"1",
"reference":"sample",
"source":"INTERNET",
"stan":"0",
"type":"PAYMENT"
},
"version":"<latest_gateway_version>"
}
}
这里是一个显示 response.gatewayCode = DECLINED 的被拒绝 Open Banking 交互的 Retrieve Transaction 响应的示例
{
"amount":123.46,
"chargeback":{
"amount":0,
"currency":"GBP"
},
"creationTime":"2020-06-11T07:06:37.862Z",
"currency":"GBP",
"device":{
"browser":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"
},
"id":"800b8d34-770d-4135-a1a4-0afe64c96352",
"item":[
{
"brand":"MC",
"category":"NA",
"detail":{
"unitDiscountRate":0,
"unitTaxRate":0
},
"name":"item0",
"quantity":1,
"sku":"sku",
"unitDiscountAmount":3,
"unitPrice":21,
"unitTaxAmount":0.47
},
{
"detail":{
"unitTaxRate":0
},
"name":"item1",
"quantity":2,
"unitDiscountAmount":2,
"unitPrice":47,
"unitTaxAmount":5
}
],
"itemAmount":115,
"lastUpdatedTime":"2020-06-11T07:06:24.923Z",
"merchant":"TESTMERCHANT1",
"merchantAmount":123.46,
"merchantCurrency":"GBP",
"reference":"sample",
"result":"SUCCESS",
"risk":{
"response":{
"gatewayCode":"ACCEPTED"
}
},
"shipping":{
"address":{
"city":"London",
"company":"ABC",
"country":"GBR",
"postcodeZip":"90001",
"stateProvince":"ENG",
"street":"2nd Main",
"street2":"lane 2"
},
"contact":{
"email":"John@gmail.com",
"firstName":"John",
"lastName":"Doe",
"mobilePhone":"9999999999",
"phone":"9999999999"
},
"method":"SAME_DAY"
},
"shippingAndHandlingAmount":4.99,
"sourceOfFunds":{
"provided":{
"openBankingBankTransfer":{
"aspspId":"123456-xxxx-4dd4-b4f2-12234vgb43bff"
}
},
"type":"OPEN_BANKING_BANK_TRANSFER"
},
"status":"FAILED",
"taxAmount":10.47,
"totalAuthorizedAmount":0,
"totalCapturedAmount":0,
"totalRefundedAmount":0,
"transaction":
{
"browserPayment":{
"interaction":{
"status":"COMPLETED",
"timeCompleted":"2020-06-11T07:06:38.269Z",
"timeInitiated":"2020-06-11T07:06:37.871Z",
"timeRedirected":"2020-06-11T07:06:37.983Z",
"timeReturned":"2020-06-11T07:06:38.241Z"
},
"operation":"PAY",
"redirectUrl":"<hostname>/bpui/ob/out/BP-6c56d32fad0f0f11df57409b9728cb5c",
"returnUrl":"<hostname>/api/documentation/integrationGuidelines/index.html"
},
"device":{
"browser":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"
},
"gatewayEntryPoint":"WEB_SERVICES_API",
"merchant":"TESTMERCHANT1",
"order":{
"amount":123.46,
"chargeback":{
"amount":0,
"currency":"GBP"
},
"creationTime":"2020-06-11T07:06:37.862Z",
"currency":"GBP",
"id":"800b8d34-770d-4135-a1a4-0afe64c96352",
"item":[
{
"brand":"MC",
"category":"NA",
"detail":{
"unitDiscountRate":0,
"unitTaxRate":0
},
"name":"item0",
"quantity":1,
"sku":"sku",
"unitDiscountAmount":3,
"unitPrice":21,
"unitTaxAmount":0.47
},
{
"detail":{
"unitTaxRate":0
},
"name":"item1",
"quantity":2,
"unitDiscountAmount":2,
"unitPrice":47,
"unitTaxAmount":5
}
],
"itemAmount":115,
"lastUpdatedTime":"2020-06-11T07:06:24.923Z",
"merchantAmount":123.46,
"merchantCurrency":"GBP",
"reference":"sample",
"shippingAndHandlingAmount":4.99,
"status":"FAILED",
"taxAmount":10.47,
"totalAuthorizedAmount":0,
"totalCapturedAmount":0,
"totalRefundedAmount":0
},
"response":{
"gatewayCode":"DECLINED"
},
"result":"FAILURE",
"risk":{
"response":{
"gatewayCode":"ACCEPTED"
}
},
"shipping":{
"address":{
"city":"London",
"company":"ABC",
"country":"GBR",
"postcodeZip":"90001",
"stateProvince":"ENG",
"street":"2nd Main",
"street2":"lane 2"
},
"contact":{
"email":"John@gmail.com",
"firstName":"John",
"lastName":"Doe",
"mobilePhone":"9999999999",
"phone":"9999999999"
},
"method":"SAME_DAY"
},
"sourceOfFunds":{
"provided":{
"openBankingBankTransfer":{
"aspspId":"123456-xxxx-4dd4-b4f2-12234vgb43bff"
}
},
"type":"OPEN_BANKING_BANK_TRANSFER"
},
"timeOfLastUpdate":"2020-06-11T07:06:24.923Z",
"timeOfRecord":"2020-06-11T07:06:37.869Z",
"transaction":{
"acquirer":{
"id":"OPEN_BANKING",
"merchantId":"Lloyds"
},
"amount":123.46,
"currency":"GBP",
"id":"1",
"reference":"sample",
"source":"INTERNET",
"stan":"0",
"type":"PAYMENT"
},
"version":"<latest_gateway_version>"
}
}
这里是一个显示 response.gatewayCode = AUTHENTICATION_FAILED 的 Open Banking 交互的 Retrieve Transaction 响应的示例
{
"browserPayment":{
"interaction":{
"status":"COMPLETED",
"timeInitiated":"2020-11-20T05:07:28.134Z",
"timeRedirected":"2020-11-20T05:07:34.498Z",
"timeReturned":"2020-11-20T05:07:43.449Z"
},
"operation":"PAY",
"redirectUrl":"<hostname>/bpui/ob/out/BP-b37b6e71a76bfa5f3847349684297033",
"returnUrl":"<hostname>/apmDemoApp/complete.html"
},
"customer":{
"email":"John@example.com"
},
"device":{
"browser":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.193 Safari/537.36"
},
"gatewayEntryPoint":"WEB_SERVICES_API",
"merchant":"TESTMERCHANT1",
"order":{
"amount":85116.16,
"chargeback":{
"amount":0,
"currency":"GBP"
},
"creationTime":"2020-11-20T05:07:28.085Z",
"currency":"GBP",
"id":"408124232",
"lastUpdatedTime":"2020-11-20T05:07:46.524Z",
"merchantAmount":85116.16,
"merchantCurrency":"GBP",
"reference":"TEST-SUCCEED",
"status":"FAILED",
"totalAuthorizedAmount":0,
"totalCapturedAmount":0,
"totalRefundedAmount":0
},
"response":{
"gatewayCode":"AUTHENTICATION_FAILED"
},
"result":"FAILURE",
"shipping":{
"address":{
"city":"Shipsville",
"country":"GBR",
"postcodeZip":"EH67DX",
"stateProvince":"Scotland",
"street":"2ShippingHeights",
"street2":"ShipsDrive"
},
"contact":{
"email":"johnsmith@yahoo.com",
"firstName":"Shipfirst",
"lastName":"McShiplast"
}
},
"sourceOfFunds":{
"provided":{
"openBankingBankTransfer":{
"aspspId":"123456-xxxx-4dd4-b4f2-12234vgb43bff"
}
},
"type":"OPEN_BANKING_BANK_TRANSFER"
},
"timeOfLastUpdate":"2020-11-20T05:07:46.524Z",
"timeOfRecord":"2020-11-20T05:07:28.130Z",
"transaction":{
"acquirer":{
"id":"OPEN_BANKING",
"merchantId":"Lloyds"
},
"amount":85116.16,
"currency":"GBP",
"id":"162988232",
"receipt":"16491f04ec662b0a",
"source":"INTERNET",
"stan":"0",
"type":"PAYMENT"
},
"version":"<latest_gateway_version>"
}
这里是一个显示 response.gatewayCode = CANCELLED 的 Open Banking 交互的 Retrieve Transaction 响应的示例
{
"browserPayment":{
"interaction":{
"status":"COMPLETED",
"timeInitiated":"2020-11-20T05:17:33.076Z",
"timeRedirected":"2020-11-20T05:17:40.315Z",
"timeReturned":"2020-11-20T05:17:47.612Z"
},
"operation":"PAY",
"redirectUrl":"<hostname>/bpui/ob/out/BP-fdc97e608a425ec6cc535ae6a8dd9063",
"returnUrl":"<hostname>/apmDemoApp/complete.html"
},
"customer":{
"email":"John@example.com"
},
"device":{
"browser":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.193 Safari/537.36"
},
"gatewayEntryPoint":"WEB_SERVICES_API",
"merchant":"TESTMERCHANT1",
"order":{
"amount":86117.17,
"chargeback":{
"amount":0,
"currency":"GBP"
},
"creationTime":"2020-11-20T05:17:33.039Z",
"currency":"GBP",
"id":"849804618",
"lastUpdatedTime":"2020-11-20T05:17:50.060Z",
"merchantAmount":86117.17,
"merchantCurrency":"GBP",
"reference":"TEST-SUCCEED",
"status":"FAILED",
"totalAuthorizedAmount":0,
"totalCapturedAmount":0,
"totalRefundedAmount":0
},
"response":{
"gatewayCode":"CANCELLED"
},
"result":"FAILURE",
"shipping":{
"address":{
"city":"Shipsville",
"country":"GBR",
"postcodeZip":"EH67DX",
"stateProvince":"Scotland",
"street":"2ShippingHeights",
"street2":"ShipsDrive"
},
"contact":{
"email":"johnsmith@yahoo.com",
"firstName":"Shipfirst",
"lastName":"McShiplast"
}
},
"sourceOfFunds":{
"provided":{
"openBankingBankTransfer":{
"aspspId":"123456-xxxx-4dd4-b4f2-12234vgb43bff"
}
},
"type":"OPEN_BANKING_BANK_TRANSFER"
},
"timeOfLastUpdate":"2020-11-20T05:17:50.060Z",
"timeOfRecord":"2020-11-20T05:17:33.073Z",
"transaction":{
"acquirer":{
"id":"OPEN_BANKING",
"merchantId":"Lloyds"
},
"amount":86117.17,
"currency":"GBP",
"id":"921434587",
"receipt":"16491f91c5986259",
"source":"INTERNET",
"stan":"0",
"type":"PAYMENT"
},
"version":"<latest_gateway_version>"
}
退款
先决条件
仅国内交易支持退款。 您可以通过 Refund 操作或 Merchant Administration 门户提交 Refund 请求。 对于 Open Banking 付款,您可以部分或全部退还已过账交易的已经处理的付款。 Open Banking Transfer 付款不支持超额退款。
结算信息
要查看 Open Banking Bank Transfer 交易结算的详细信息,请使用 Retrieve Order/Retrieve Transaction 操作检索订单/交易详细信息,并查看 transaction.receipt 字段获取参考号。 相同的参考号将在付款收据上显示给付款人。
Webhook 通知
订阅 Webhook 通知后,在网关中创建或更新订单交易时您可以在系统中收到通知。 这样您可以相应地更新商家系统。 Webhook 通知包含 Retrieve Transaction 操作的响应。
{
"browserPayment":{
"interaction":{
"status":"COMPLETED",
"timeInitiated":"2021-02-18T10:59:26.772Z",
"timeRedirected":"2021-02-18T10:59:31.236Z",
"timeReturned":"2021-02-18T11:00:01.577Z"
},
"operation":"PAY",
"redirectUrl":"https://lloydsbankpayfrombank.gateway.mastercard.com/bpui/ob/out/BP-5da80e52dd990b1970ae8bdfc6fddb36",
"returnUrl":"https://prd-mastercard.airbakery.eu/Return.aspx"
},
"customer":{
"email":"johnsmith@yahoo.com"
},
"device":{
"browser":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36 Edg/88.0.705.68",
"ipAddress":"101.00.100.00"
},
"gatewayEntryPoint":"WEB_SERVICES_API",
"merchant":"AIRBAKERY",
"order":{
"amount":5.00,
"chargeback":{
"amount":0,
"currency":"GBP"
},
"creationTime":"2021-02-18T10:59:26.728Z",
"currency":"GBP",
"id":"TESTORD12345",
"lastUpdatedTime":"2021-02-18T11:00:31.905Z",
"merchantAmount":5.00,
"merchantCurrency":"GBP",
"status":"CAPTURED",
"totalAuthorizedAmount":5.00,
"totalCapturedAmount":5.00,
"totalRefundedAmount":0
},
"response":{
"gatewayCode":"APPROVED"
},
"result":"SUCCESS",
"risk":{
"response":{
"gatewayCode":"ACCEPTED",
"review":{
"decision":"NOT_REQUIRED",
"note":""
},
"rule":[
{
"data":"100.00.100.01",
"name":"MSO_IP_ADDRESS_RANGE",
"recommendation":"NO_ACTION",
"type":"MSO_RULE"
},
{
"data":"GBR",
"name":"MSO_IP_COUNTRY",
"recommendation":"NO_ACTION",
"type":"MSO_RULE"
}
]
}
},
"sourceOfFunds":{
"provided":{
"openBankingBankTransfer":{
"aspspId":"12345-23abc-a2g-a8e7-5653886af4"
}
},
"type":"OPEN_BANKING_BANK_TRANSFER"
},
"timeOfLastUpdate":"2021-02-18T11:00:31.905Z",
"timeOfRecord":"2021-02-18T10:59:26.768Z",
"transaction":{
"acquirer":{
"id":"OPEN_BANKING",
"merchantId":"Lloyds"
},
"amount":5.00,
"currency":"GBP",
"id":" TESTTRX12345",
"receipt":"52345667731732aa",
"source":"INTERNET",
"stan":"0",
"type":"PAYMENT"
},
"version":"<latest_gateway_version>"
}
Webhook 响应说明
下表提供了对 Webhook 响应中每个元素的描述
项目 |
说明 | 值 |
|---|---|---|
| BrowserPayment | 网关管理与浏览器付款服务提供商网站的交互所需的信息。 | - |
| Interaction | 提供您的系统与提供商系统在发起浏览器付款、将客户的浏览器重定向到提供商的系统、返回商家的网站以及完成浏览器付款时所进行的交互的详细信息 | - |
| Status | 商家系统和支付服务提供商系统之间进行的交互的状态。 | COMPLETED: 此浏览器付款已完成,即支付结果已通知网关。 INITIATED: 此浏览器付款已成功发起。 REDIRECTED_TO_PROVIDER: 付款人的浏览器已重定向到支付服务提供商的网站。 RETURNED_TO_MERCHANT: 付款人的浏览器已从支付服务提供商的网站重定向回商家网站。 |
| Time Initiated | 发起浏览器付款的日期和时间。 | 例如,以下是引用了格式的示例值: 2021-02-18T10:59:26.772Z |
| Time Redirected | 从商家网站收到客户浏览器并重定向到提供商网站的日期和时间。 | 例如,以下是引用了格式的示例值: 2021-02-18T10:59:31.236Z |
| Time Returned | 从提供商网站收到客户浏览器并重定向回商家网站的日期和时间。 | 例如,以下是引用了格式的示例值: 2021-02-18T11:00:01.577Z |
| Operation | 为此付款创建的交易类型。 | PAY |
| Redirect URL | 付款人选择“Open Banking Bank Transfer”付款方式时,付款人浏览器将重定向到的商家网站内的 URL。 | - |
| Return URL | 在支付服务提供商的网站上完成支付时,您希望付款人浏览器重定向到的 URL。 无论付款成功与否,网关都将使用相同的重定向 URL 重定向付款人的浏览器。 商家可以构建解决方案来查询成功或未成功响应以向付款人显示特定消息。 | - |
| Customer | 关于客户的信息。 例如,客户的联系详细信息、电子邮件地址,等等。 | - |
| 客户的电子邮件地址。 确保电子邮件地址在 3 个字符以上,并且属于众多有效的 RFC 2822 电子邮件地址的一种。 | 例如 - JohnDoe@yahoo.com | |
| Device | 有关付款人用于此交易的设备的信息 | - |
| Browser | 客户用于下订单的浏览器的用户-代理标头 | 例如 -“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36 Edg/88.0.705.68” |
| IP Address | 付款人所使用的设备的 IP 地址,格式为 nnn.nnn.nnn.nnn | - |
| GatewayEntryPoint | 交易被提交到网关所通过的接口。 | 默认为“WEB_SERVICE_API” |
| Merchant | 您的支付服务提供商发给您的唯一标识符。 也叫作“商家 ID”。 | Merchant name |
| Order | 与此交易关联的订单的信息。 | - |
| Amount | 订单的总额。 等于净额加上所有附加费。 如果您提供任何小计金额,这些金额(order.itemAmount、order.taxAmount、order.shippingAndHandlingAmount、order.cashbackAmount、order.gratuityAmount)的总和减去 order.discountAmount 必须等于净额。 | 例如 - 5.00 |
| Chargeback | 不适用于 Open Banking Bank Transfer,但金额和货币应按照下方指定 | - |
| Amount | - | 零 |
| Currency | - | GBP |
| Creation Time | 从网关创建订单的日期和时间 | 例如,以下是引用了格式的示例值: 2021-02-18T10:59:26.728Z |
| Currency | 以 ISO 4217 字母码表示的订单的货币 | GBP |
| ID | 将此订单与您创建的所有其他订单区分开的订单唯一识别码。 在后续交易和检索操作中引用此订单时将使用此识别码。 此值对于您的商家配置文件创建的每个订单必须是唯一的。 | 生成的订单 ID |
| Last updated time | 来自网关的订单上次更新的日期和时间。 以“ISO8601 日期 + 时间”格式表示的某个时刻 -“YYYY-MM-DDThh:mm:ss.SSSZ” | 例如,以下是引用了格式的示例值: 2021-02-18T11:00:31.905Z |
| Merchant amount | 订单的总额 | 例如 - 5.00 |
| Merchant currency | 以 ISO 4217 字母码表示的订单的货币。 | GBP |
| Status | 此订单在付款流程中的当前进度。 | CANCELLED: 已经成功取消此订单的初始交易。 CAPTURED: 此订单的授权金额已成功全部或超额过账 FAILED: 付款未成功 INITIATED: 此订单已成功发起付款。 尚未进行付款。 |
| Total Authorized Amount | 此订单的金额已成功授权。 | 对于 Open Banking Bank Transfer,此值始终等于订单金额。 |
| Total Captured Amount | 此订单的金额已成功过账。 | 对于 Open Banking Bank Transfer,此值始终等于订单金额。 |
| Total Refunded Amount | 此订单的金额已成功退款。 | 对于 Open Banking Bank Transfer,此值始终是 zero。 |
| Response | 此交易的网关响应。 | - |
| Gateway Code | 操作是否成功的摘要。 | ACQUIRER_SYSTEM_ERROR: 处理交易时发生收单行系统错误 APPROVED: 交易已审批 AUTHENTICATION_FAILED: 付款人身份验证失败 CANCELLED: 交易被付款人取消 DECLINED: 请求的操作未成功。 例如,付款被发卡机构拒绝或付款人身份验证无法成功完成。 INSUFFICIENT_FUNDS: 交易由于资金不足被拒 NOT_SUPPORTED: 不支持此交易类型 PENDING: 交易等待处理 SUBMITTED: 已经在网关中成功创建交易。 正在等待提交给收单行或已提交给收单行,但网关尚未收到有关付款成功与否的响应。 TIMED_OUT: 由于没有收到响应,网关已将对收单行发起的请求进行超时处理。 不应向付款人提供积分兑换。 UNKNOWN: 交易已提交给收单行,但网关无法查明付款是否成功。 如果网关随后发现付款成功,将更新响应代码。 UNSPECIFIED_FAILURE: 交易无法处理 |
| Results | 系统生成的高级总体操作结果。 | FAILURE: 操作被网关、收单行或发卡机构拒绝。 PENDING: 操作当前正在进行或等待处理。 SUCCESS: 操作已成功处理。 UNKNOWN: 操作结果未知 |
| Risk | 与风险评估相关的信息不适用于 Open Banking Bank Transfer。 请忽略此对象下的详细信息。 | - |
| SourceOfFunds | 有关付款人为此付款选择的付款类型以及资金来源的信息。 | - |
| Provided | 直接提供(不是通过令牌或会话)资金来源时资金来源的信息。 | - |
| Open Banking Bank Transfer | 与 Open Banking Bank Transfer 相关的其他详细信息,也称为 Open Banking Bank Transfer。 | - |
| ASPSP ID | 付款人银行的识别码,也称为 ASPSP(账户服务支付服务提供商) | - |
| Type | 此付款使用的付款方式 | Open Banking Bank Transfer |
| TimeOfLastUpdated | 来自网关的交易上次更新的日期和时间。 | 例如,以下是引用了格式的示例值: 2021-02-18T11:00:31.905Z |
| TimeOfRecord | 来自网关的交易创建的日期和时间。 | 例如,以下是引用了格式的示例值: 2021-02-18T10:59:26.768Z |
| Transaction | 有关此交易的信息。 | - |
| Acquirer | 有关此收单行的信息。 | - |
| ID | 用于处理交易的收单行的 ID | Open Banking |
| Merchant ID | 收单行分配给商家的识别码 | Lloyds |
| Amount | 交易的总金额。 | 例如 - 5.00 |
| Currency | 以 ISO 4217 字母码表示的交易的货币 | GBP |
| ID | 此交易的唯一标识符,用于将其与订单上的任何其他交易进行区分。 | 生成的交易 ID。 |
| Receipt | 收单行为特定商家交互生成的唯一参考。 | 为商家生成的参考号。 |
| Source | 指示您从付款人处收到此订单的付款授权的渠道 | INTERNET |
| STAN | 交易的系统跟踪号 (STAN)。 | 零 |
| Type | 指示对订单执行的操作类型。 | PAYMENT |
| Version | 提交请求的 Web 服务 API 版本。 | 默认版本 - 63 |
测试 Open Banking Bank Transfer 集成
<<paymentGateway>> 提供了一个 Open Banking Bank Transfer 示例模拟器,您可以通过它使用测试银行和测试金额来测试您的集成。 完成与 Open Banking JavaScript SDK 的集成后,您可以使用 Copernicium 银行的测试交易金额执行测试交易,如下表所示。 如果您希望继续使用 Ozone Modelo 测试银行,请使用屏幕上下拉列表中的选项选择要测试的场景(成功/失败)。
场景 |
交易金额 | 交易状态 | 订单状态 |
|---|---|---|---|
| 成功场景(默认) | 80111.11 GBP | SUBMITTED | INITIATED |
| 成功场景(默认) | 81112.12 GBP | PENDING RESPONSE | CAPTURED |
| 成功场景(默认) | 92123.23 GBP | APPROVED | CAPTURED |
| 失败场景(默认) | 83114.14 GBP | UNSPECIFIED FAILURE | FAILED |
| 访问被拒绝 | 85116.16 GBP | AUTHENTICATION FAILED | FAILED |
| 交易请求超时 | 84115.15 GBP | TIMED OUT | FAILED |
| 已取消交易 | 86117.17 GBP | CANCELLED | FAILED |
| 失败场景 - 付款处理超时 | 87118.18 GBP | TIMED OUT | FAILED |
| 资金不足 | 88119.19 GBP | INSUFFICIENT FUNDS | FAILED |
| 无效金额 | 89120.20 GBP | NOT SUPPORTED | FAILED |
| 无效货币 | 89120.20 GBP | NOT SUPPORTED | FAILED |