Skip to main content

Checkout SDK

Checkout SDK uses a JavaScript Client-Side Library that can be easily integrated into your payment page.

This library is responsible for rendering the user interface and managing the necessary communication with the Paylands Platform to execute any type of transaction smoothly.

To use the SDK, it will be necessary to first generate an order in Paylands. This order should contain the UUID of the checkout created earlier. For example:

"extra_data": {
"checkout": {"uuid": <checkout UUID>}
}

On our webpage, we will load the checkout script.

<script async src="https://ws-paylands.paynopain.com/assets/checkout/paylands-checkout-sdk.js"></script>

And then we will initialize the SDK.

const paylandsCheckout = await PaylandsCheckout.create({token: '9fdade323e7...'});
Request
tokenMandatoryToken of the previously generated order
languageOptional
Default: "es"
Language of the checkout
environmentOptional
Values: "PRODUCTION", "SANDBOX"
Default: "PRODUCTION"
Environment

This will grant us access to all the functions of the SDK.

Redirection

It will redirect the user to the previously created and customized checkout.

await paylandsCheckout.redirect();

Rendering

It allows us to render the created and customized checkout on our own page.

await paylandsCheckout.render('renderContainer');
Request
containerMandatoryID of the container where the checkout will be rendered

Once the user completes the payment, an event will be sent on the webpage with one of the following values that should be handled by the merchant:

Response
redirectURL to redirect the user to with the payment result OK/KO
renderHTML content to render on the page.
This occurs because user intervention is required again, typically to complete 3DS
errorHTML content with the occurred error.

Card Form

It allows us to render a customizable card form on our page.

await paylandsCheckout.card({
container: 'renderContainer',
form: { ... },
customization: { ... }
});
Request
containerMandatoryID of the container where the form will be rendered
form (Object)MandatoryForm configuration
customization (Object)MandatoryForm customization
form (Object)
holderLabelOptionalLabel for the cardholder input
holderErrorOptionalError message to show if the value is incorrect
panLabelOptionalLabel for the card PAN input
panErrorOptionalError message to show if the value is incorrect
expiryLabelOptionalLabel for the card expiry date input
expiryErrorOptionalError message to show if the value is incorrect
cvvLabelOptionalLabel for the card CVV input
cvvErrorOptionalError message to show if the value is incorrect
customization (Object)
fontOptionalText font
textColorOptionalText color
backgroundColorOptionalBackground color
errorColorOptionalError text color
borderColorOptionalInput border color
borderRadiusOptionalInput border radius
paddingOptionalPadding
inputTextSizeOptionalInput text size
labelTextSizeOptionalLabel text size
iconSizeOptionalIcon size
iconColorOptionalIcon color

How to validate the form? The form has its own validation, which communicates through the card_valid event.

window.addEventListener('message', event => {
if (event.data.card_valid === true) {
console.log('The form is valid');
}
if (event.data.card_valid === false) {
console.log('The form contains errors');
}
});

How to submit? Send a pay event with the value card.

button.addEventListener("click", () => window.postMessage({ pay: "card" }));

This event will be captured by the SDK to process the payment. Once processed, it will send a new event on the webpage with one of the following values that should be handled by the merchant:

Response
redirectURL to redirect the user to with the payment result OK/KO
renderHTML content to render on the page.
This occurs because user intervention is required again, typically to complete 3DS
errorHTML content with the occurred error.

Google Pay

It allows us to render a Google Pay button. It's necessary to have it previously configured.

await paylandsCheckout.google_pay('renderContainer');
Request
containerMandatoryID of the container where the Google Pay button will be rendered

Once the user completes the payment, an event will be sent on the webpage with one of the following values that should be handled by the merchant:

Response
redirectURL to redirect the user to with the payment result OK/KO
renderHTML content to render on the page.
This occurs because user intervention is required again, typically to complete 3DS
errorHTML content with the occurred error.

Apple Pay

It allows us to render an Apple Pay button. It's necessary to have it configured previously. Keep in mind that Apple Pay is only compatible with Apple devices and Safari. In any other case, the button will not be displayed.

await paylandsCheckout.apple_pay('renderContainer');
Request
containerMandatoryID of the container where the Apple Pay button will be rendered

Once the user completes the payment, an event will be sent on the webpage with one of the following values that should be handled by the merchant:

Response
redirectURL to redirect the user to with the payment result OK/KO
renderHTML content to render on the page.
This occurs because user intervention is required again, typically to complete 3DS
errorHTML content with the occurred error.

PayPal

It allows us to render a PayPal button. It's necessary to have it configured previously.

await paylandsCheckout.payPal({
container: 'renderContainer',
form: { ... },
customization: { ... }
});
Request
containerMandatoryID of the container where the button will be rendered
form (Object)MandatoryButton configuration
customization (Object)MandatoryButton customization
form (Object)
prefilledAddressOptionalUser's address if known
prefilledCountryOptionalUser's country if known
customization (Object)
layoutOptionalhttps://developer.paypal.com/sdk/js/reference/#link-layout
colorOptionalhttps://developer.paypal.com/sdk/js/reference/#link-color
labelOptionalhttps://developer.paypal.com/sdk/js/reference/#link-label
borderRadiusOptionalhttps://developer.paypal.com/sdk/js/reference/#link-borderradius

Once the user completes the payment, an event will be sent on the webpage with one of the following values that should be handled by the merchant:

Response
redirectURL to redirect the user to with the payment result OK/KO
renderHTML content to render on the page.
This occurs because user intervention is required again, typically to complete 3DS
errorHTML content with the occurred error.

Crypto

It allows us to render a Crypto button.

await paylandsCheckout.crypto({
container: 'renderContainer',
customization: { ... }
});
Request
containerMandatoryID of the container where the button will be rendered
customization (Object)MandatoryButton customization
customization (Object)
buttonTextOptionalButton content
fontOptionalText font
primaryColorOptionalButton color
textColorOptionalText color
backgroundColorOptionalBackground color
borderRadiusOptionalButton border radius
paddingOptionalPadding
buttonTextSizeOptionalButton text size

Once the user completes the payment, an event will be sent on the webpage with one of the following values that should be handled by the merchant:

Response
redirectURL to redirect the user to with the payment result OK/KO
renderHTML content to render on the page.
This occurs because user intervention is required again, typically to complete 3DS
errorHTML content with the occurred error.

Pix

It allows us to render a Pix button.

await paylandsCheckout.pix({
container: 'renderContainer',
customization: { ... }
});
Request
containerMandatoryID of the container where the button will be rendered
customization (Object)MandatoryButton customization
customization (Object)
buttonTextOptionalButton content
fontOptionalText font
primaryColorOptionalButton color
textColorOptionalText color
backgroundColorOptionalBackground color
borderRadiusOptionalButton border radius
paddingOptionalPadding
buttonTextSizeOptionalButton text size

Once the user completes the payment, an event will be sent on the webpage with one of the following values that should be handled by the merchant:

Response
redirectURL to redirect the user to with the payment result OK/KO
renderHTML content to render on the page.
This occurs because user intervention is required again, typically to complete 3DS
errorHTML content with the occurred error.

Floa

It allows us to render a Floa button.

await paylandsCheckout.floa({
container: 'renderContainer',
customization: { ... }
});
Request
containerMandatoryID of the container where the button will be rendered
customization (Object)MandatoryButton customization
customization (Object)
buttonTextOptionalButton content
fontOptionalText font
primaryColorOptionalButton color
textColorOptionalText color
backgroundColorOptionalBackground color
borderRadiusOptionalButton border radius
paddingOptionalPadding
buttonTextSizeOptionalButton text size

Once the user completes the payment, an event will be sent on the webpage with one of the following values that should be handled by the merchant:

Response
redirectURL to redirect the user to with the payment result OK/KO
renderHTML content to render on the page.
This occurs because user intervention is required again, typically to complete 3DS
errorHTML content with the occurred error.

PSE

It allows us to render a PSE button.

await paylandsCheckout.pse({
container: 'renderContainer',
customization: { ... }
});
Request
containerMandatoryID of the container where the button will be rendered
customization (Object)MandatoryButton customization
customization (Object)
buttonTextOptionalButton content
fontOptionalText font
primaryColorOptionalButton color
textColorOptionalText color
backgroundColorOptionalBackground color
borderRadiusOptionalButton border radius
paddingOptionalPadding
buttonTextSizeOptionalButton text size

Once the user completes the payment, an event will be sent on the webpage with one of the following values that should be handled by the merchant:

Response
redirectURL to redirect the user to with the payment result OK/KO
renderHTML content to render on the page.
This occurs because user intervention is required again, typically to complete 3DS
errorHTML content with the occurred error.

SPEI

It allows us to render a SPEI button.

await paylandsCheckout.spei({
container: 'renderContainer',
customization: { ... }
});
Request
containerMandatoryID of the container where the button will be rendered
customization (Object)MandatoryButton customization
customization (Object)
buttonTextOptionalButton content
fontOptionalText font
primaryColorOptionalButton color
textColorOptionalText color
backgroundColorOptionalBackground color
borderRadiusOptionalButton border radius
paddingOptionalPadding
buttonTextSizeOptionalButton text size

Once the user completes the payment, an event will be sent on the webpage with one of the following values that should be handled by the merchant:

Response
redirectURL to redirect the user to with the payment result OK/KO
renderHTML content to render on the page.
This occurs because user intervention is required again, typically to complete 3DS
errorHTML content with the occurred error.

Bizum

It allows us to render a Bizum form on our page.

await paylandsCheckout.bizum({
container: 'renderContainer',
form: { ... },
customization: { ... }
});
Request
containerMandatoryID of the container where the form will be rendered
form (Object)MandatoryConfiguration of the form
customization (Object)MandatoryForm customization
form (Object)
prefixLabelOptionalLabel for the phone prefix input
prefixErrorOptionalError message to display if the value is incorrect
phoneLabelOptionalLabel for the phone number input
phoneErrorOptionalError message to display if the value is incorrect
prefilledPrefixOptionalUser's phone prefix if known
prefilledPhoneOptionalUser's phone number if known
customization (Object)
fontOptionalText font
textColorOptionalText color
backgroundColorOptionalBackground color
errorColorOptionalText color for errors
borderColorOptionalBorder color of inputs
borderRadiusOptionalBorder radius of inputs
paddingOptionalPadding
inputTextSizeOptionalInput text size
labelTextSizeOptionalLabel text size
iconSizeOptionalIcon size
iconColorOptionalIcon color

How to validate the form? The form has its own validation, which communicates through the bizum_valid event.

window.addEventListener('message', event => {
if (event.data.bizum_valid === true) {
console.log('The form is valid');
}
if (event.data.bizum_valid === false) {
console.log('The form contains errors');
}
});

How to submit? Send a pay event with the value bizum.

button.addEventListener("click", () => window.postMessage({ pay: "bizum" }));

This event will be captured by the SDK to process the payment. Once processed, it will send a new event on the webpage with one of the following values that should be handled by the merchant:

Response
redirectURL to redirect the user to with the payment result OK/KO
renderHTML content to render on the page.
This occurs because user intervention is required again, typically to complete 3DS
errorHTML content with the occurred error.

Cofidis

It allows us to render a Cofidis form on our page.

await paylandsCheckout.cofidis({
container: 'renderContainer',
form: { ... },
customization: { ... }
});
Request
containerMandatoryID of the container where the form will be rendered
form (Object)MandatoryConfiguration of the form
customization (Object)MandatoryForm customization
form (Object)
nameLabelOptionalLabel for the name input
nameErrorOptionalError message to display if the value is incorrect
lastNameLabelOptionalLabel for the last name input
lastNameErrorOptionalError message to display if the value is incorrect
emailLabelOptionalLabel for the email input
emailErrorOptionalError message to display if the value is incorrect
prefilledNameOptionalUser's name if known
prefilledLastNameOptionalUser's last name if known
prefilledEmailOptionalUser's email if known
customization (Object)
fontOptionalText font
textColorOptionalText color
backgroundColorOptionalBackground color
errorColorOptionalText color for errors
borderColorOptionalBorder color of inputs
borderRadiusOptionalBorder radius of inputs
paddingOptionalPadding
inputTextSizeOptionalInput text size
labelTextSizeOptionalLabel text size
iconSizeOptionalIcon size
iconColorOptionalIcon color

How to validate the form? The form has its own validation, which communicates through the cofidis_valid event.

window.addEventListener('message', event => {
if (event.data.cofidis_valid === true) {
console.log('The form is valid');
}
if (event.data.cofidis_valid === false) {
console.log('The form contains errors');
}
});

How to submit? Send a pay event with the value cofidis.

button.addEventListener("click", () => window.postMessage({ pay: "cofidis" }));

This event will be captured by the SDK to process the payment. Once processed, it will send a new event on the webpage with one of the following values that should be handled by the merchant:

Response
redirectURL to redirect the user to with the payment result OK/KO
renderHTML content to render on the page.
This occurs because user intervention is required again, typically to complete 3DS
errorHTML content with the occurred error.

Giropay

It will allow us to render a Giropay form on our page.

await paylandsCheckout.giropay({
container: 'renderContainer',
form: { ... },
customization: { ... }
});
Request
containerMandatoryID of the container where the form will be rendered
form (Object)MandatoryForm configuration
customization (Object)MandatoryForm customization
form (Object)
nameLabelOptionalLabel for the name input
nameErrorOptionalError message to display if the value is incorrect
lastNameLabelOptionalLabel for the last name input
lastNameErrorOptionalError message to display if the value is incorrect
emailLabelOptionalLabel for the email input
emailErrorOptionalError message to display if the value is incorrect
addressLabelOptionalLabel for the address input
addressErrorOptionalError message to display if the value is incorrect
zipCodeLabelOptionalLabel for the zip code input
zipCodeErrorOptionalError message to display if the value is incorrect
cityLabelOptionalLabel for the city input
cityErrorOptionalError message to display if the value is incorrect
countryLabelOptionalLabel for the country input
countryErrorOptionalError message to display if the value is incorrect
prefilledNameOptionalUser's name if known
prefilledLastNameOptionalUser's last name if known
prefilledEmailOptionalUser's email if known
prefilledAddressOptionalUser's address if known
prefilledZipCodeOptionalUser's zip code if known
prefilledCityOptionalUser's city if known
prefilledCountryOptionalUser's country if known
customization (Object)
fontOptionalText font
textColorOptionalText color
backgroundColorOptionalBackground color
errorColorOptionalError text color
borderColorOptionalInput fields border color
borderRadiusOptionalInput fields border radius
paddingOptionalPadding
inputTextSizeOptionalInput text size
labelTextSizeOptionalLabel text size
iconSizeOptionalIcon size
iconColorOptionalIcon color

How to validate the form? The form has its own validation which communicates through the giropay_valid event.

window.addEventListener('message', event => {
if (event.data.giropay_valid === true) {
console.log('The form is valid');
}
if (event.data.giropay_valid === false) {
console.log('The form contains errors');
}
});

How to submit? Send a pay event with the value giropay.

button.addEventListener("click", () => window.postMessage({ pay: "giropay" }));

This event will be captured by the SDK to process the payment. Once processed, it will send a new event on the page itself with one of the following values that should be handled by the merchant:

Response
redirectURL to redirect the user to with the payment result OK/KO
renderHTML content to render on the page.
This happens because user intervention is required again, usually to complete the 3DS
errorHTML content with the error that occurred.

Ideal

It will allow us to render an iDEAL form on our page.

await paylandsCheckout.ideal({
container: 'renderContainer',
form: { ... },
customization: { ... }
});
Request
containerMandatoryID of the container where the form will be rendered
form (Object)MandatoryForm configuration
customization (Object)MandatoryForm customization
form (Object)
nameLabelOptionalLabel for the name input
nameErrorOptionalError message to display if the value is incorrect
lastNameLabelOptionalLabel for the last name input
lastNameErrorOptionalError message to display if the value is incorrect
emailLabelOptionalLabel for the email input
emailErrorOptionalError message to display if the value is incorrect
addressLabelOptionalLabel for the address input
addressErrorOptionalError message to display if the value is incorrect
zipCodeLabelOptionalLabel for the zip code input
zipCodeErrorOptionalError message to display if the value is incorrect
cityLabelOptionalLabel for the city input
cityErrorOptionalError message to display if the value is incorrect
countryLabelOptionalLabel for the country input
countryErrorOptionalError message to display if the value is incorrect
prefilledNameOptionalUser's name if known
prefilledLastNameOptionalUser's last name if known
prefilledEmailOptionalUser's email if known
prefilledAddressOptionalUser's address if known
prefilledZipCodeOptionalUser's zip code if known
prefilledCityOptionalUser's city if known
prefilledCountryOptionalUser's country if known
customization (Object)
fontOptionalText font
textColorOptionalText color
backgroundColorOptionalBackground color
errorColorOptionalError text color
borderColorOptionalInput fields border color
borderRadiusOptionalInput fields border radius
paddingOptionalPadding
inputTextSizeOptionalInput text size
labelTextSizeOptionalLabel text size
iconSizeOptionalIcon size
iconColorOptionalIcon color

How to validate the form? The form has its own validation which communicates through the ideal_valid event.

window.addEventListener('message', event => {
if (event.data.ideal_valid === true) {
console.log('The form is valid');
}
if (event.data.ideal_valid === false) {
console.log('The form contains errors');
}
});

How to submit? Send a pay event with the value ideal.

button.addEventListener("click", () => window.postMessage({ pay: "ideal" }));

This event will be captured by the SDK to process the payment. Once processed, it will send a new event on the page itself with one of the following values that should be handled by the merchant:

Response
redirectURL to redirect the user to with the payment result OK/KO
renderHTML content to render on the page.
This happens because user intervention is required again, usually to complete the 3DS
errorHTML content with the error that occurred.

Klarna

It will allow us to render a Klarna form on our page.

await paylandsCheckout.klarna({
container: 'renderContainer',
form: { ... },
customization: { ... }
});
Request
containerMandatoryID of the container where the form will be rendered
form (Object)MandatoryForm configuration
customization (Object)MandatoryForm customization
form (Object)
nameLabelOptionalLabel for the name input
nameErrorOptionalError message to display if the value is incorrect
lastNameLabelOptionalLabel for the last name input
lastNameErrorOptionalError message to display if the value is incorrect
emailLabelOptionalLabel for the email input
emailErrorOptionalError message to display if the value is incorrect
addressLabelOptionalLabel for the address input
addressErrorOptionalError message to display if the value is incorrect
zipCodeLabelOptionalLabel for the zip code input
zipCodeErrorOptionalError message to display if the value is incorrect
cityLabelOptionalLabel for the city input
cityErrorOptionalError message to display if the value is incorrect
countryLabelOptionalLabel for the country input
countryErrorOptionalError message to display if the value is incorrect
prefilledNameOptionalUser's name if known
prefilledLastNameOptionalUser's last name if known
prefilledEmailOptionalUser's email if known
prefilledAddressOptionalUser's address if known
prefilledZipCodeOptionalUser's zip code if known
prefilledCityOptionalUser's city if known
prefilledCountryOptionalUser's country if known
customization (Object)
fontOptionalText font
textColorOptionalText color
backgroundColorOptionalBackground color
errorColorOptionalError text color
borderColorOptionalInput fields border color
borderRadiusOptionalInput fields border radius
paddingOptionalPadding
inputTextSizeOptionalInput text size
labelTextSizeOptionalLabel text size
iconSizeOptionalIcon size
iconColorOptionalIcon color

How to validate the form? The form has its own validation which communicates through the klarna_valid event.

window.addEventListener('message', event => {
if (event.data.klarna_valid === true) {
console.log('The form is valid');
}
if (event.data.klarna_valid === false) {
console.log('The form contains errors');
}
});

How to submit? Send a pay event with the value klarna.

button.addEventListener("click", () => window.postMessage({ pay: "klarna" }));

This event will be captured by the SDK to process the payment. Once processed, it will send a new event on the page itself with one of the following values that should be handled by the merchant:

Response
redirectURL to redirect the user to with the payment result OK/KO
renderHTML content to render on the page.
This happens because user intervention is required again, usually to complete the 3DS
errorHTML content with the error that occurred.

MBWay

It will allow us to render an MBWay form on our page.

await paylandsCheckout.mbway({
container: 'renderContainer',
form: { ... },
customization: { ... }
});
Request
containerMandatoryID of the container where the form will be rendered
form (Object)MandatoryForm configuration
customization (Object)MandatoryForm customization
form (Object)
nameLabelOptionalLabel for the name input
nameErrorOptionalError message to display if the value is incorrect
lastNameLabelOptionalLabel for the last name input
lastNameErrorOptionalError message to display if the value is incorrect
emailLabelOptionalLabel for the email input
emailErrorOptionalError message to display if the value is incorrect
prefixLabelOptionalLabel for the telephone prefix input
prefixErrorOptionalError message to display if the value is incorrect
phoneLabelOptionalLabel for the telephone number input
phoneErrorOptionalError message to display if the value is incorrect
prefilledNameOptionalUser's name if known
prefilledLastNameOptionalUser's last name if known
prefilledEmailOptionalUser's email if known
prefilledPrefixOptionalUser's telephone prefix if known
prefilledPhoneOptionalUser's telephone number if known
customization (Object)
fontOptionalText font
textColorOptionalText color
backgroundColorOptionalBackground color
errorColorOptionalError text color
borderColorOptionalInput fields border color
borderRadiusOptionalInput fields border radius
paddingOptionalPadding
inputTextSizeOptionalInput text size
labelTextSizeOptionalLabel text size
iconSizeOptionalIcon size
iconColorOptionalIcon color

How to validate the form? The form has its own validation which communicates through the mbway_valid event.

window.addEventListener('message', event => {
if (event.data.mbway_valid === true) {
console.log('The form is valid');
}
if (event.data.mbway_valid === false) {
console.log('The form contains errors');
}
});

How to submit? Send a pay event with the value mbway.

button.addEventListener("click", () => window.postMessage({ pay: "mbway" }));

This event will be captured by the SDK to process the payment. Once processed, it will send a new event on the page itself with one of the following values that should be handled by the merchant:

Response
redirectURL to redirect the user to with the payment result OK/KO
renderHTML content to render on the page.
This happens because user intervention is required again, usually to complete the 3DS
errorHTML content with the error that occurred.

Multibanco

It will allow us to render a Multibanco form on our page.

await paylandsCheckout.multibanco({
container: 'renderContainer',
customization: { ... }
});
Request
containerMandatoryID of the container where the form will be rendered
customization (Object)MandatoryForm customization
customization (Object)
buttonTextOptionalButton content
fontOptionalText font
primaryColorOptionalButton color
textColorOptionalText color
backgroundColorOptionalBackground color
borderRadiusOptionalButton border radius
paddingOptionalPadding
buttonTextSizeOptionalButton text size

Once the user completes the payment, an event will be sent on the webpage with one of the following values that should be handled by the merchant:

Response
redirectURL to redirect the user to with the payment result OK/KO
renderHTML content to render on the page.
This occurs because user intervention is required again, typically to complete 3DS
errorHTML content with the occurred error.

Sofort

It will allow us to render a Sofort form on our page.

await paylandsCheckout.sofort({
container: 'renderContainer',
form: { ... },
customization: { ... }
});
Request
containerMandatoryID of the container where the form will be rendered
form (Object)MandatoryForm configuration
customization (Object)MandatoryForm customization
form (Object)
nameLabelOptionalLabel for the name input
nameErrorOptionalError message to display if the value is incorrect
lastNameLabelOptionalLabel for the last name input
lastNameErrorOptionalError message to display if the value is incorrect
emailLabelOptionalLabel for the email input
emailErrorOptionalError message to display if the value is incorrect
addressLabelOptionalLabel for the address input
addressErrorOptionalError message to display if the value is incorrect
zipCodeLabelOptionalLabel for the postal code input
zipCodeErrorOptionalError message to display if the value is incorrect
cityLabelOptionalLabel for the city input
cityErrorOptionalError message to display if the value is incorrect
countryLabelOptionalLabel for the country input
countryErrorOptionalError message to display if the value is incorrect
prefilledNameOptionalUser's name if known
prefilledLastNameOptionalUser's last name if known
prefilledEmailOptionalUser's email if known
prefilledAddressOptionalUser's address if known
prefilledZipCodeOptionalUser's postal code if known
prefilledCityOptionalUser's city if known
prefilledCountryOptionalUser's country if known
customization (Object)
fontOptionalText font
textColorOptionalText color
backgroundColorOptionalBackground color
errorColorOptionalError text color
borderColorOptionalInput fields border color
borderRadiusOptionalInput fields border radius
paddingOptionalPadding
inputTextSizeOptionalInput text size
labelTextSizeOptionalLabel text size
iconSizeOptionalIcon size
iconColorOptionalIcon color

How to validate the form? The form has its own validation which communicates through the sofort_valid event.

window.addEventListener('message', event => {
if (event.data.sofort_valid === true) {
console.log('The form is valid');
}
if (event.data.sofort_valid === false) {
console.log('The form contains errors');
}
});

How to submit? Send a pay event with the value sofort.

button.addEventListener("click", () => window.postMessage({ pay: "sofort" }));

This event will be captured by the SDK to process the payment. Once processed, it will send a new event on the page itself with one of the following values that should be handled by the merchant:

Response
redirectURL to redirect the user to with the payment result OK/KO
renderHTML content to render on the page.
This happens because user intervention is required again, usually to complete the 3DS
errorHTML content with the error that occurred.

Bank Transfer

It will allow us to render a bank transfer button on our page.

await paylandsCheckout.transfer({
container: 'renderContainer',
customization: { ... }
});
Request
containerMandatoryID of the container where the button will be rendered
customization (Object)MandatoryButton customization
customization (Object)
buttonTextOptionalButton content
fontOptionalText font
primaryColorOptionalButton color
textColorOptionalText color
backgroundColorOptionalBackground color
borderRadiusOptionalButton border radius
paddingOptionalPadding
buttonTextSizeOptionalButton text size

Once the user completes the payment, an event will be sent on the webpage with one of the following values that should be handled by the merchant:

Response
redirectURL to redirect the user to with the payment result OK/KO
renderHTML content to render on the page.
This occurs because user intervention is required again, typically to complete 3DS
errorHTML content with the occurred error.

Viacash

It will allow us to render a Viacash form on our page.

await paylandsCheckout.viacash({
container: 'renderContainer',
form: { ... },
customization: { ... }
});
Request
containerRequiredID of the container where the form will be rendered
form (Object)RequiredForm configuration
customization (Object)RequiredForm customization
form (Object)
nameLabelOptionalLabel for the name input
nameErrorOptionalError message to display if the value is incorrect
lastNameLabelOptionalLabel for the last name input
lastNameErrorOptionalError message to display if the value is incorrect
emailLabelOptionalLabel for the email input
emailErrorOptionalError message to display if the value is incorrect
prefilledNameOptionalUser's name if known
prefilledLastNameOptionalUser's last name if known
prefilledEmailOptionalUser's email if known
customization (Object)
fontOptionalText font
textColorOptionalText color
backgroundColorOptionalBackground color
errorColorOptionalError text color
borderColorOptionalInput border color
borderRadiusOptionalInput border radius
paddingOptionalSpacing
inputTextSizeOptionalInput text size
labelTextSizeOptionalLabel text size
iconSizeOptionalIcon size
iconColorOptionalIcon color

How to validate the form? The form has its own validation which communicates through the viacash_valid event.

window.addEventListener('message', event => {
if (event.data.viacash_valid === true) {
console.log('The form is valid');
}
if (event.data.viacash_valid === false) {
console.log('The form contains errors');
}
});

How to submit? Send a pay event with the value viacash.

button.addEventListener("click", () => window.postMessage({ pay: "viacash" }));

This event will be captured by the SDK to process the payment. Once processed, it will send a new event back to the page with one of the following values, which the merchant needs to handle:

Response
redirectURL to redirect the user to with the payment result (OK/KO)
renderHTML content to render on the page.
This occurs because the user's intervention is required, usually to complete the 3DS
errorHTML content with the error that occurred

Mach

It will allow us to render a Mach form on our page.

await paylandsCheckout.mach({
container: 'renderContainer',
form: { ... },
customization: { ... }
});
Request
containerRequiredID of the container where the form will be rendered
form (Object)RequiredForm configuration
customization (Object)RequiredForm customization
form (Object)
nameLabelOptionalLabel for the name input
nameErrorOptionalError message to display if the value is incorrect
lastNameLabelOptionalLabel for the last name input
lastNameErrorOptionalError message to display if the value is incorrect
emailLabelOptionalLabel for the email input
emailErrorOptionalError message to display if the value is incorrect
prefilledNameOptionalUser's name if known
prefilledLastNameOptionalUser's last name if known
prefilledEmailOptionalUser's email if known
customization (Object)
fontOptionalText font
textColorOptionalText color
backgroundColorOptionalBackground color
errorColorOptionalError text color
borderColorOptionalInput border color
borderRadiusOptionalInput border radius
paddingOptionalSpacing
inputTextSizeOptionalInput text size
labelTextSizeOptionalLabel text size
iconSizeOptionalIcon size
iconColorOptionalIcon color

How to validate the form? The form has its own validation which communicates through the mach_valid event.

window.addEventListener('message', event => {
if (event.data.mach_valid === true) {
console.log('The form is valid');
}
if (event.data.mach_valid === false) {
console.log('The form contains errors');
}
});

How to submit? Send a pay event with the value mach.

button.addEventListener("click", () => window.postMessage({ pay: "mach" }));

This event will be captured by the SDK to process the payment. Once processed, it will send a new event back to the page with one of the following values, which the merchant needs to handle:

Response
redirectURL to redirect the user to with the payment result (OK/KO)
renderHTML content to render on the page.
This occurs because the user's intervention is required, usually to complete the 3DS
errorHTML content with the error that occurred

Khipu

It will allow us to render a Mach form on our page.

await paylandsCheckout.khipu({
container: 'renderContainer',
form: { ... },
customization: { ... }
});
Request
containerRequiredID of the container where the form will be rendered
form (Object)RequiredForm configuration
customization (Object)RequiredForm customization
form (Object)
nameLabelOptionalLabel for the name input
nameErrorOptionalError message to display if the value is incorrect
lastNameLabelOptionalLabel for the last name input
lastNameErrorOptionalError message to display if the value is incorrect
emailLabelOptionalLabel for the email input
emailErrorOptionalError message to display if the value is incorrect
prefilledNameOptionalUser's name if known
prefilledLastNameOptionalUser's last name if known
prefilledEmailOptionalUser's email if known
customization (Object)
fontOptionalText font
textColorOptionalText color
backgroundColorOptionalBackground color
errorColorOptionalError text color
borderColorOptionalInput border color
borderRadiusOptionalInput border radius
paddingOptionalSpacing
inputTextSizeOptionalInput text size
labelTextSizeOptionalLabel text size
iconSizeOptionalIcon size
iconColorOptionalIcon color

How to validate the form? The form has its own validation which communicates through the khipu_valid event.

window.addEventListener('message', event => {
if (event.data.khipu_valid === true) {
console.log('The form is valid');
}
if (event.data.khipu_valid === false) {
console.log('The form contains errors');
}
});

How to submit? Send a pay event with the value khipu.

button.addEventListener("click", () => window.postMessage({ pay: "khipu" }));

This event will be captured by the SDK to process the payment. Once processed, it will send a new event back to the page with one of the following values, which the merchant needs to handle:

Response
redirectURL to redirect the user to with the payment result (OK/KO)
renderHTML content to render on the page.
This occurs because the user's intervention is required, usually to complete the 3DS
errorHTML content with the error that occurred

Klap

It will allow us to render a Mach form on our page.

await paylandsCheckout.klap({
container: 'renderContainer',
form: { ... },
customization: { ... }
});
Request
containerRequiredID of the container where the form will be rendered
form (Object)RequiredForm configuration
customization (Object)RequiredForm customization
form (Object)
nameLabelOptionalLabel for the name input
nameErrorOptionalError message to display if the value is incorrect
lastNameLabelOptionalLabel for the last name input
lastNameErrorOptionalError message to display if the value is incorrect
emailLabelOptionalLabel for the email input
emailErrorOptionalError message to display if the value is incorrect
prefilledNameOptionalUser's name if known
prefilledLastNameOptionalUser's last name if known
prefilledEmailOptionalUser's email if known
customization (Object)
fontOptionalText font
textColorOptionalText color
backgroundColorOptionalBackground color
errorColorOptionalError text color
borderColorOptionalInput border color
borderRadiusOptionalInput border radius
paddingOptionalSpacing
inputTextSizeOptionalInput text size
labelTextSizeOptionalLabel text size
iconSizeOptionalIcon size
iconColorOptionalIcon color

How to validate the form? The form has its own validation which communicates through the klap_valid event.

window.addEventListener('message', event => {
if (event.data.klap_valid === true) {
console.log('The form is valid');
}
if (event.data.klap_valid === false) {
console.log('The form contains errors');
}
});

How to submit? Send a pay event with the value klap.

button.addEventListener("click", () => window.postMessage({ pay: "klap" }));

This event will be captured by the SDK to process the payment. Once processed, it will send a new event back to the page with one of the following values, which the merchant needs to handle:

Response
redirectURL to redirect the user to with the payment result (OK/KO)
renderHTML content to render on the page.
This occurs because the user's intervention is required, usually to complete the 3DS
errorHTML content with the error that occurred

Flowpay

It will allow us to render a Mach form on our page.

await paylandsCheckout.flowpay({
container: 'renderContainer',
form: { ... },
customization: { ... }
});
Request
containerRequiredID of the container where the form will be rendered
form (Object)RequiredForm configuration
customization (Object)RequiredForm customization
form (Object)
nameLabelOptionalLabel for the name input
nameErrorOptionalError message to display if the value is incorrect
lastNameLabelOptionalLabel for the last name input
lastNameErrorOptionalError message to display if the value is incorrect
emailLabelOptionalLabel for the email input
emailErrorOptionalError message to display if the value is incorrect
prefilledNameOptionalUser's name if known
prefilledLastNameOptionalUser's last name if known
prefilledEmailOptionalUser's email if known
customization (Object)
fontOptionalText font
textColorOptionalText color
backgroundColorOptionalBackground color
errorColorOptionalError text color
borderColorOptionalInput border color
borderRadiusOptionalInput border radius
paddingOptionalSpacing
inputTextSizeOptionalInput text size
labelTextSizeOptionalLabel text size
iconSizeOptionalIcon size
iconColorOptionalIcon color

How to validate the form? The form has its own validation which communicates through the flowpay_valid event.

window.addEventListener('message', event => {
if (event.data.flowpay_valid === true) {
console.log('The form is valid');
}
if (event.data.flowpay_valid === false) {
console.log('The form contains errors');
}
});

How to submit? Send a pay event with the value flowpay.

button.addEventListener("click", () => window.postMessage({ pay: "flowpay" }));

This event will be captured by the SDK to process the payment. Once processed, it will send a new event back to the page with one of the following values, which the merchant needs to handle:

Response
redirectURL to redirect the user to with the payment result (OK/KO)
renderHTML content to render on the page.
This occurs because the user's intervention is required, usually to complete the 3DS
errorHTML content with the error that occurred

PicPay

It allows us to render a PicPay button.

await paylandsCheckout.picpay({
container: 'renderContainer',
customization: { ... }
});
Request
containerMandatoryID of the container where the button will be rendered
customization (Object)MandatoryButton customization
customization (Object)
buttonTextOptionalButton content
fontOptionalText font
primaryColorOptionalButton color
textColorOptionalText color
backgroundColorOptionalBackground color
borderRadiusOptionalButton border radius
paddingOptionalPadding
buttonTextSizeOptionalButton text size

Once the user completes the payment, an event will be sent on the webpage with one of the following values that should be handled by the merchant:

Response
redirectURL to redirect the user to with the payment result OK/KO
renderHTML content to render on the page.
This occurs because user intervention is required again, typically to complete 3DS
errorHTML content with the occurred error.

Paysafecard

It allows us to render a Paysafecard button.

await paylandsCheckout.paysafecard({
container: 'renderContainer',
customization: { ... }
});
Request
containerMandatoryID of the container where the button will be rendered
customization (Object)MandatoryButton customization
customization (Object)
buttonTextOptionalButton content
fontOptionalText font
primaryColorOptionalButton color
textColorOptionalText color
backgroundColorOptionalBackground color
borderRadiusOptionalButton border radius
paddingOptionalPadding
buttonTextSizeOptionalButton text size

Once the user completes the payment, an event will be sent on the webpage with one of the following values that should be handled by the merchant:

Response
redirectURL to redirect the user to with the payment result OK/KO
renderHTML content to render on the page.
This occurs because user intervention is required again, typically to complete 3DS
errorHTML content with the occurred error.