Integrate Klarna on your website or mobile application and fully customize your checkout experience using your own UI.
Parameter Name | Required | Description |
---|---|---|
currencyCode | ✓ | 3-letter currency code in ISO 4217 format, e.g. USD for US dollars |
order ↳ lineItems | ✓ | Details of the line items of the order |
order ↳ countryCode | ✓ | The country code of the user.Learn more about the supported countries and currencies by visiting Klarna Documentation. |
customer ↳ emailAddress | Customer’s email address. Pass this value to pre-fill the Klarna payment form. | |
customer ↳ mobileNumber | Customer’s mobile number (make sure it is the correct format for the country code). Pass this value to pre-fill the Klarna payment form. | |
customer ↳ shippingAddress | Customer’s shipping address. Pass this value to pre-fill the Klarna payment form. | |
customer ↳ billingAddress | Customer’s billing address. Pass this value to pre-fill the Klarna payment form. When passing customer.billingAddress in the client session, ensure that Klarna has payment method categories configured for the given address. If Klarna is not supported for the given billing address, no Klarna button will be rendered in the checkout | |
paymentMethod ↳ options ↳ KLARNA ↳ extraMerchantData | Extra Merchant Data (EMD) package supported by Klarna can be passed via the client session. Any JSON object that will be accepted by Klarna can be sent. Available schemas are documented here |
KlarnaPaymentMethodMethodManager
, follow these steps:onAvailablePaymentMethodsLoaded
as described here
KLARNA
payment method manager type and create a payment method manager as described here `
onPaymentMethodCategoriesChange
callback will be called with a payload that will have a format as seen here
onPaymentMethodCategoriesChange
callback to create the custom component/form
renderCategory
function available in the manager. The renderCategory
function requires, as parameters, the selected category id, a container id where to render the details about the payment category and an onHeightChange
callback that will be called when the payment category height has changed. You can use the height returned by the onHeightChange
callback to update the height of the container in which the payment category details will be displayed.
start
function provided by the payment method manager created at step 3
KLARNA
payment method manageronAvailablePaymentMethodsLoad
callback will be called with all available payment methods. Use this function and create a custom configuration for the KLARNA
payment method manager type and afterwards start the payment process.onPaymentMethodCategoriesChange
callback received a payload as described here The options array can be used to configure a custom component/form.Handle data collectionstart
function from the payment method manager. You can use the result of the start function to handle any errorsParameter Name | Required | Description |
---|---|---|
customerId | ✓ | A unique identifier for your customer |