A token received from Klarna API that authenticates the widget.
Example:
Klarna.Customer.Transaction.widget("ey...")
Register an event handler for the widgeterror
event.
Anytime an error occurs during the widget flow, the error event is triggered.
If the error event handler is defined, all errors will be emitted to it instead of thrown upwards in the widget method.
Example
klarna.Customer.Transaction.on("widgeterror", (error, widgetData) => {
// Handle the error
// widgetData contains the status of the widget
// error contains the error details
});
The event name.
Event callback handler.
Called when the widget is closed and there is a state change for the order.
The event name.
Event callback handler.
Called when widget is closed and there is no state change for the order.
The event name.
Event callback handler.
Load the Klarna widget for the operation.
The
z-index
of elements in application page calling widget() should not exceed10000