Follow these steps if the Klarna payment button is not an available integration type for your site.
<button type="button" id="BUY">Buy</button>
Details on how to configure this request are outlined in Prepare the button click event configuration[https://docs.klarna.com#client-side-integration #client-side-integration].
const paymentRequest = klarna.Payment.request(
{
paymentAmount: 9999,
currency: "EUR",
config: {
redirectUrl:
"https://example.com?id={klarna.payment_request.id}andtoken={klarna.payment_request.payment_confirmation_token}"
}
},
{
var initiate = document.getElementById("BUY");
initiate.addEventListener("click", function (event) {
paymentRequest.initiate();
});
For details regarding next steps, continue with Monitor payment state and retrieve payment confirmation token. Additionally, consult the payment flow section for an overview of the customer journey.