- 集成指南
- 支持的功能(付款方式)
- 实施浏览器付款集成
- Klarna 付款
Klarna
Klarna AB 是一家受欢迎的瑞典银行,为欧洲的付款人提供一系列灵活的在线购物金融选项。 通过 Klarna 付款方式,付款人可以选择立即付款、货到后付款或分几期付款。
American Express Payment Gateway 支持 Klarna 付款方式。 此页内容介绍特定于 Klarna 付款方式的集成详细信息。 建议您在构建 Klarna 集成前,先阅读浏览器付款集成指南。
先决条件
要通过 American Express Payment Gateway 提供 Klarna 付款方式,
- 您必须向您的浏览器付款服务提供商注册
- 您在 American Express Payment Gateway 上的商家配置文件必须通过浏览器付款服务提供商使用您的账户的详细信息配置,以及
- 您必须有使用支持的货币之一的银行账户,且该账户已向您在浏览器付款服务提供商处的商家账户注册。
Klarna Pay Later
Klarna AB 是一家瑞典银行,提供一种延迟付款方式 Klarna Pay Later。 付款人查看商家配送给他们的商品,只留下打算购买的那些商品并付款,然后退回不需要的商品。 对于批准的付款,Klarna AB 会承担所有信用和欺诈风险,向您支付全部订单金额。 请确保通过 Refund 操作为付款人退回给您的每件商品退款。 付款人可以通过对购买的全部金额执行 Refund 来取消订单。 Klarna 接下来会向付款人开票并收取付款,并会在付款到期前发送电子邮件通知和提醒。
Klarna Pay Later 支持源自多个国家/地区的相应货币的交易。
国家/地区 | 货币 |
---|---|
奥地利 (AUT) | EUR |
德国 (DEU) | EUR |
荷兰 (NLD) | EUR |
芬兰 (FIN) | EUR |
瑞典 (SWE) | SEK |
挪威 (NOR) | NOK |
英国 (GBR) | GBP |
丹麦 (DNK) | DKK |
Klarna Financing
Klarna AB 是一家瑞典银行,提供一种灵活的付款方式 Klarna Financing。 它是一个长期金融协议,付款人可以购买商品,然后以分期付款方式付费。 您可以选择在 6 到 36 期内每月等额分期付款(包括利息(如果有)),每月支付最低金额,或在一个月内还清全部金额。
Klarna Financing 支持源自多个国家/地区的相应货币的交易。
国家/地区 | 货币 |
---|---|
奥地利 (AUT) | EUR |
德国 (DEU) | EUR |
荷兰 (NLD) | EUR |
芬兰 (FIN) | EUR |
瑞典 (SWE) | SEK |
挪威 (NOR) | NOK |
英国 (GBR) | GBP |
丹麦 (DNK) | DKK |
Klarna Pay Now
Klarna AB 是一家瑞典银行,提供一种即时付款方式 Klarna Pay Now。 付款人可以通过银行转账、直接借记或任何卡来付款。
Klarna Pay Now 支持源自多个国家/地区的相应货币的交易。
国家/地区 | 货币 |
---|---|
奥地利 (AUT) | EUR |
德国 (DEU) | EUR |
荷兰 (NLD) | EUR |
瑞典 (SWE) | SEK |
Klarna 集成
Hosted Checkout 集成让您可以通过 American Express Payment Gateway 托管和显示的交互来从付款人处收集付款详细信息。
Klarna Pay Later
从 API 版本 52 开始,在 your payment service provider 为您启用并配置了 Klarna Pay Later 后,它会自动成为付款方式之一。
Klarna Financing
从 API 版本 62 开始,在 your payment service provider 为您启用并配置了 Klarna Financing 后,它会自动成为付款方式之一。
Klarna Pay Now
不久之后将实现通过 Hosted Checkout 使用 Klarna Pay Now。 请联系 your payment service provider 了解更多信息。
有关详细信息,请参阅通过 Hosted Checkout 集成进行浏览器付款。
Web-Services API 集成可让您在自己的结账页提供 Klarna 付款方式。
Klarna Pay Later
Web-Services API 版本 52 起支持 Klarna Pay Later。
在 sourceOfFunds.type = KLARNA_PAY_LATER
且 browserPayment.operation = PAY
时发起 Initiate Browser Payment
请求(Klarna 不支持 Authorize 操作)。
Initiate Browser Payment
请求时使用 sourceOfFunds.type = KLARNA
。{ "apiOperation": "INITIATE_BROWSER_PAYMENT", "browserPayment": { "operation": "PAY", "returnUrl": "<your_merchant_URL>" }, "customer": { "email": "john.smith@example.com", "firstName": "John", "lastName": "Smith", "mobilePhone": "01234567890" }, "billing": { "address": { "street": "10 Upper Bank Street", "postcodeZip": "E14 5NP", "city": "London", "country": "GBR" } }, "order": { "amount": 57.2, "currency": "GBP", "item": [ { "name": "Blue Jeans", "quantity": "1", "unitPrice": 70.83, "unitDiscountAmount": 48.16, "unitTaxAmount": 4.53, "detail": { "unitTaxRate": 0.2 } }, { "name": "Red Shirt", "quantity": "1", "unitPrice": 20.83, "unitTaxAmount": 4.17, "detail": { "unitTaxRate": 0.2 } }, { "name": "Shipping & Handling", "quantity": "1", "unitPrice": 4.17, "unitTaxAmount": 0.83, "detail": { "unitTaxRate": 0.2 } } ] }, "sourceOfFunds": { "type": "KLARNA_PAY_LATER" } }
Klarna Financing
Web-Services API 版本 61 起支持 Klarna Financing。
在 sourceOfFunds.type = KLARNA_FINANCING
且 browserPayment.operation = PAY
时发起 Initiate Browser Payment
请求(Klarna 不支持 Authorize 操作)。
{ "apiOperation":"INITIATE_BROWSER_PAYMENT", "browserPayment":{ "operation":"PAY", "returnUrl":"<your_merchant_URL>" }, "customer":{ "email":"john.smith@example.com", "firstName":"John", "lastName":"Smith", "mobilePhone":"01234567890" }, "billing":{ "address":{ "street":"10 Upper Bank Street", "postcodeZip":"E14 5NP", "city":"London", "country":"GBR" } }, "order":{ "amount":99.2, "currency":"GBP", "item":[ { "name":"Blue Jeans", "quantity":"1", "unitPrice":70.83, "unitDiscountAmount":48.16, "unitTaxAmount":4.53, "detail":{ "unitTaxRate":0.2 } }, { "name":"Red Shirt", "quantity":"1", "unitPrice":20.83, "unitTaxAmount":4.17, "detail":{ "unitTaxRate":0.2 } }, { "name":"Leather Belt", "quantity":"1", "unitPrice":25, "unitTaxAmount":5, "detail":{ "unitTaxRate":0.2 } }, { "name":"Baseball Cap", "quantity":"1", "unitPrice":10, "unitTaxAmount":2, "detail":{ "unitTaxRate":0.2 } }, { "name":"Shipping and Handling", "quantity":"1", "unitPrice":4.17, "unitTaxAmount":0.83, "detail":{ "unitTaxRate":0.2 } } ] }, "sourceOfFunds":{ "type":"KLARNA_FINANCING" } }
Klarna Pay Now
Web-Services API 版本 63 起支持 Klarna Pay Now。
在 sourceOfFunds.type = KLARNA_PAY_NOW
且 browserPayment.operation = PAY
时发起 Initiate Browser Payment
请求(Klarna 不支持 Authorize 操作)。
{ "apiOperation":"INITIATE_BROWSER_PAYMENT", "billing":{ "address":{ "city":"Edinburgh", "company":"MPGS", "country":"DEU", "postcodeZip":"EH123AB", "stateProvince":"Scotland", "street":"OceanPoint", "street2":"OceanDrive" } }, "browserPayment":{ "operation":"PAY", "returnUrl":"<your_merchant_URL>" }, "customer":{ "account":{ "id":"custoAccount" }, "dateOfBirth":"1999-12-31", "email":"john.smith@example.com", "firstName":"John", "lastName":"Smith", "mobilePhone":"01234567890", "nationalId":"X4RTBPFW4" }, "order":{ "amount":"154.16", "currency":"EUR", "item":[ { "name":"Diesel Jeans", "quantity":"1", "unitPrice":"70.83" }, { "name":"Adidas Trainers", "quantity":"1", "unitPrice":"83.33" } ] }, "shipping":{ "address":{ "city":"Shipsville", "country":"GBR", "postcodeZip":"EH67DX", "stateProvince":"Scotland", "street":"2ShippingHeights", "street2":"ShipsDrive" }, "contact":{ "email":"john.smith@example.com", "firstName":"John", "lastName":"Smith" } }, "sourceOfFunds":{ "type":"KLARNA_PAY_NOW" } }
除浏览器付款请求中需要的标准字段外,还应提供处理 Klarna 付款所需的以下信息。
账单地址和联系人详细信息
除非另有说明,否则这些字段是强制的,是支持 Klarna 风险评估和信用检查流程的必需字段。 付款人的联系人信息用于与付款人通信以及提供电子发票和付款通知。
billing.address.city
billing.address.country
billing.address.postcodeZip
billing.address.street
customer.email
customer.firstName
customer.lastName
customer.mobilePhone
: 在不提供customer.phone
时,此字段是必需的。customer.phone
: 在不提供customer.mobilePhone
时,此字段是必需的。customer.nationalId
: 此字段为可选字段。
送货地址和联系人详细信息
如果为任何 shipping.address.*
或 shipping.contact.*
字段提供了值,这些字段则是强制的。
shipping.address.city
shipping.address.country
shipping.address.postcodeZip
shipping.address.street
shipping.contact.email
shipping.contact.firstName
shipping.contact.lastName
订单项详细信息
提供所购买的每个订单商品的完整详细信息,以便 Klarna 可以正确验证并向付款人显示这些信息,并支持 Klarna 的风险和信用检查流程。
order.item[n].name
order.item[n].quantity
: 此字段的值必须是整数。order.item[n].unitPrice
order.item[n].unitDiscountAmount
: 当商品使用折扣时,此字段是必需的,而且,如果在order.discount.amount
字段中提供了值,则必须提供此字段。order.item[n].unitTaxAmount
: 当付款人必须为商品纳税时,此字段是必需的。order.item[n].detail.unitTaxRate
: 当提供了单位纳税金额值时,此字段是必需的。
运费和手续费
订单应支付的总纳税金额会在付款流期间向付款人显示。 如果应付的运送和处理费金额包含纳税金额,那么您必须创建一个订单行来表示运送和处理,以便可以提供独立的纳税金额。 如果不需要支付税金,运送和处理费金额可以在 order.shippingAndHandlingAmount
字段中提供。
首选语言
您可以通过在 Initiate Browser Payment 请求中提供 browserPayment.preferredLanguage
字段来设置 Klarna 为向付款人显示的页面使用的首选语言。 但是,对于 Klarna,将仅支持 billing.address.country
的主要国语或英语。
退单
Klarna 付款存在退单风险。 如果付款人在与 Klarna 的付款纠纷中抗辩成功,将在订单上创建退单交易。 有关更多信息,请参阅退单交易。
如何解释交易结果
下表显示了在发起 Klarna 付款后您可能遇到的可能出现的情景的交易响应代码。
Initiate Browser Payment 响应 |
具体含义... |
---|---|
response.gatewayCode=SUBMITTED result=SUCCESS |
使用响应中提供的 URL 重定向付款人。 |
Retrieve Transaction/Retrieve Order 响应 |
具体含义... |
response.gatewayCode=APPROVED result=SUCCESS |
付款成功。 |
response.gatewayCode= PENDING result=PENDING |
American Express Payment Gateway 等待来自收单行的付款结果通知。 稍后重试 RETRIEVE_TRANSACTION 或接收来自 American Express Payment Gateway 的通知。 |
response.gatewayCode= CANCELLED result=FAILURE |
付款人已取消此付款的交互。 为付款人提供尝试其他付款方式的选项。 |
response.gatewayCode= DECLINED or ACQUIRER_SYSTEM_ERROR result=FAILURE |
付款被拒绝。 为付款人提供尝试其他付款方式的选项。 如果出现 ACQUIRER_SYSTEM_ERROR ,您可能需要询问收单行付款失败的原因,也可以重试 RETRIEVE_TRANSACTION 。 |
response.gatewayCode=TIMED_OUT result=FAILURE |
请将此情况视为被拒付款。 American Express Payment Gateway 将进行尝试以确保交易不成功或撤消交易。 |
Klarna 订单 ID
对于批准的付款,American Express Payment Gateway 将在字段 transaction.acquirer.additionalResponseData
中向您提供 Klarna 分配给此订单的 ID。 此信息对于您可能与 Klarna 之间进行的直接通信可能很有用。
Web Hook 通知
如果您订阅了 American Express Payment Gateway Web Hook 通知,您可能会收到有关奖金提供状态更新和退单的其他通知。
测试您的集成
American Express Payment Gateway 提供允许您测试您的 Klarna 集成的浏览器付款模拟器。