Klarna Pay Now
Klarna Pay Now is an immediate payment method provided by Klarna AB, a popular Swedish bank, to payers in Europe. Payers can pay either through a bank transfer, a direct debit, or any card.
Klarna Pay Now is supported in the Mastercard Gateway. This page describes integration details specific to Klarna Pay Now. It is recommended that you read the integration guidelines for browser payments, before building the Klarna Pay Now integration.
Prerequisites
To offer Klarna Pay Now through the Mastercard Gateway,
- you must be registered with your browser payments service provider
- your merchant profile on the Mastercard Gateway must be configured using the details of your account with the browser payments service provider, and
- you must have a bank account in one of the supported currencies registered against your merchant account at your browser payments service provider.
Klarna Pay Now Transactions
Klarna Pay Now supports transactions originating from multiple countries with their corresponding currencies.
Country | Currency |
---|---|
Austria (AUT) | EUR |
Belgium (BEL) | EUR |
Germany (DEU) | EUR |
Italy (ITA) | EUR |
Netherlands (NLD) | EUR |
Sweden (SWE) | SEK |
Spain (ESP) | EUR |
Switzerland (CHE) | CHF |
Klarna Pay Now Integration
Hosted Checkout integration allows you to collect payment details from your payer through an interaction that the gateway hosts and displays.
From the API version 65 onward, Klarna Pay Now is automatically available as a payment method once your payment service provider enables and configures you for this payment method.
For details, see Browser Payments via Hosted Checkout Integration.
Direct Payment integration allows you to offer the Klarna Pay Now on your own checkout page.
Klarna Pay Now is supported from the API version 63 onward.
Make an Initiate Browser Payment
request where sourceOfFunds.type = KLARNA_PAY_NOW
and
browserPayment.operation = PAY
(Klarna Pay Now does not support the Authorize operation.
From the API version 65 onward, use the bankAccountCountryCode
field. This field specifies the country where payers have their bank accounts.
{ "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", "provided":{ "klarnaPayNow":{ "bankAccountCountryCode":"GBR" } } } }
In addition to the standard fields required in a browser payment request, provide the following required information for the processing of Klarna Pay Now.
Billing Address and Contact Details
These fields are mandatory unless otherwise stated and are required to support the Klarna Pay Now risk assessment and credit checking processes. The payer's contact information is used to communicate with the payer and to provide electronic invoices and payment notifications.
billing.address.city
billing.address.country
billing.address.postcodeZip
billing.address.street
customer.email
customer.firstName
customer.lastName
customer.mobilePhone
: This field is required whencustomer.phone
is not provided.customer.phone
: This field is required whencustomer.mobilePhone
is not provided.customer.nationalId
: This field is optional.
Shipping Address and Contact Details
These fields are mandatory when a value for any shipping.address.*
or shipping.contact.*
field is provided.
shipping.address.city
shipping.address.country
shipping.address.postcodeZip
shipping.address.street
shipping.contact.email
shipping.contact.firstName
shipping.contact.lastName
Order Item Details
Provide complete details about each order item that is purchased so that Klarna Pay Now can correctly validate and display this information to payers and support risk and credit checking processes of Klarna Pay Now.
order.item[n].name
order.item[n].quantity
: The value of this field must be an integer.order.item[n].unitPrice
order.item[n].unitDiscountAmount
: This field is required when the item has been discounted and must be provided if a value is provided in theorder.discount.amount
field.order.item[n].unitTaxAmount
: This field is required when a payer has to pay tax on the item.order.item[n].detail.unitTaxRate
: This field is required when a value for unit tax amount has been provided.
Payer's Bank Account Country Code
You must provide payer's bank account country code in the sourceOfFunds.provided.klarnaPayNow.bankAccountCountryCode field.
Shipping and Handling
The total tax amount payable for the order is displayed to payers during the payment flow. If the amount payable for
shipping and handling includes tax, then you must create an order line to represent shipping and handling so that the
discrete tax amount can be provided. If tax does not apply then the shipping and handling amount can be provided in the order.shippingAndHandlingAmount
field.
Preferred Language
You can set the language that you prefer Klarna Pay Now to use for pages displayed to payers by providing the
browserPayment.preferredLanguage
field in the Initiate Browser Payment request. However, for Klarna Pay Now only the primary national language of the billing.address.country
or English will be supported.
Chargebacks
Klarna Pay Now are at risk of chargebacks. If payers successfully dispute a payment with Klarna Pay Now, then a chargeback transaction will be created on the order. For more information, see chargeback transaction.
How to Interpret the Transaction Result
The table below shows the transaction response codes for the possible scenarios you may encounter after initiating Klarna Pay Now.
Initiate Browser Payment Response |
What This Means... |
---|---|
response.gatewayCode=SUBMITTED result=SUCCESS |
Redirect the payer using the URL provided in the response. |
Retrieve Transaction/Retrieve Order Response |
What This Means... |
response.gatewayCode=APPROVED result=SUCCESS |
The payment is successful. |
response.gatewayCode= PENDING result=PENDING |
The Mastercard Gateway is waiting for a notification from the acquirer about the payment result. Try RETRIEVE_TRANSACTION again later or listen to notifications from the Mastercard Gateway. |
response.gatewayCode= CANCELLED result=FAILURE |
The payer has cancelled the interaction for this payment. Offer the payer the option to try another payment method. |
response.gatewayCode= DECLINED or ACQUIRER_SYSTEM_ERROR result=FAILURE |
The payment was declined. Offer the payer the option to try another payment method. In the case of an ACQUIRER_SYSTEM_ERROR you may want to inquire with the acquirer the reason for payment failure, or you can try RETRIEVE_TRANSACTION again. |
response.gatewayCode=TIMED_OUT result=FAILURE |
Treat this as a declined payment. The Mastercard Gateway will make an attempt to ensure the transaction is not successful or will revert the transaction. |
Klarna Pay Now Order ID
For approved payments, the Mastercard Gateway will provide you the ID that Klarna Pay Now has assigned to this order in the field transaction.acquirer.additionalResponseData
. This may be useful information for communications you may have directly with Klarna Pay Now.
Web Hook Notifications
If you have subscribed to Mastercard Gateway web hook notifications, you may receive additional notifications for funding status updates and chargebacks.
Testing Your Integration
The Mastercard Gateway provides a browser payments emulator that allows you to test your Klarna Pay Now integration.