Setting up Express Checkout
Overview
To enable the express checkout, SCAYLE offers a simplified integration through a web component. With only one-time straightforward implementation, you can offer your customers a range of payment methods while managing important aspects such as access token handling and cookie consent.
Compatibility
Can be integrated in desktop, mobile web and app.
Key Features
Token Handling
The web component offers an option to handle access token refresh to ensure a secure and uninterrupted payment process. For users who have been logged in for a long period, the component checks if the access token has expired and informs the storefront. If so, the store front can prompt users to re-login to continue with the payment, preventing session disruptions while ensuring a secure transaction.
.jpg)
Access token handling in the web component
The access token creation and the log-in handling is responsibility of the storefront. The web component will only receive the token and inform of its validity.
Cookie Consent 1Handling
If you want to handle cookie consent for your shop through the Express Checkout, our web component provides an option to receive consent status directly from the shop.
- Case 1: Returning Customers
When customers first create an account or make a purchase, they may have already agreed to the shop's general cookies. However, because the express checkout uses additional cookies that weren’t included in the original consent, the shop can ask customers for permission to use these extra cookies. This can be done when the customer selects the express payment method in the basket.
- Case 2: New / Guest Customers
For new and guest users, the shop can include the express checkout cookies in the general cookie consent prompt displayed on the homepage. This ensures that consent for the express cookies is obtained before the user reaches the basket page. However, if the user rejects the cookies or closes the consent window, the shop can prompt the user to agree to the express cookies again when they select the express payment method in the basket.
- How the web component behaves if no consent is given
Each payment provider has its own method for setting cookies and may store different types of data. We recommend that tenants reach out to their payment providers for more information and a thorough legal assessment to ensure full compliance.
For example, some providers may set cookies as soon as their SDK is initialized to render the payment button on the basket page. Our web component is designed to prevent the setting of non-consented cookies when loading the express payment methods. To achieve this, we have tailored solutions depending on the specific payment provider in use.
Please reach out to your SCAYLE Account Manager for more information on this solution.
Please note that managing legal and compliance requirements, including cookie consent, is the responsibility of the shop.
Mobile App Handling
The web component can be used in mobile apps with a static button that triggers the payment SDK in a web view.
Step 1: Payment Configuration
Before enabling the express checkout, please ensure the payment method is already set up in the regular checkout for the required shops, with all relevant minimum and maximum order value constraints defined. No separate minimum/maximum order value configuration exists for Express Checkout.
Contact your SCAYLE Account Manager to configure express payment methods for your shop. Here’s an overview:
PayPal Express
SCAYLE offers PayPal wallet with the following capture types:
- Instant capture - when the money gets debited from the customer's account upon order confirmation.
- Delayed capture - the money gets debited from the customer's account once the items are shipped.
You have the flexibility to configure any of them for the express checkout. to use the same capture type as the regular checkout or set a different capture type for the express flow. Below the possibilities:
Option | Express Checkout | Regular Checkout |
---|---|---|
1 | Instant Capture | Delayed Capture |
2 | Delayed Capture | Delayed Capture |
3 | Instant Capture | Instant Capture |
4 | Delayed Capture | Instant Capture |
When raising the request for PayPal express payment configuration, please indicate the capture type to be used for both express and regular checkout.
Klarna Express
Klarna offers a variety of payment options depending on the market, such as Pay Now, Pay Later, and Pay in 3 (installments). The Express Checkout supports all of these, but to render the Klarna button on the basket page, you must define a default payment method key.
This default key is used only to ensure that a single Klarna Express button is rendered. It does not control or influence which Klarna payment option will be shown to the customer.
The pre-selection of the payment option is fully managed by Klarna, based on the shopper’s account history and behavior. SCAYLE has no control over which option appears first in the Klarna widget.
When the customer logs into their Klarna account, they will be shown all available Klarna payment methods applicable to their market — as long as the basket total falls within the limits defined in the existing Klarna configuration from the regular checkout.
Klarna Payment Options Update
If the customer selects a different Klarna option during the express checkout flow (i.e. one that differs from the default key), SCAYLE automatically updates this selection in the backend during the Review Page step.
Example: You have configured Express Checkout to use Klarna Pay Later as the default key. In the customer's Klarna account, all three Klarna options — Pay Now, Pay Later, and Pay in 3 — are available.
When the customer opens the Klarna widget and selects Klarna Pay Now instead of the default, here is what happens:
- After payment authorization, the user is redirected to the Review Page.
- The checkout backend detects the updated Klarna selection and updates the transaction accordingly.
- The backend then validates whether the basket total meets the min/max limits defined for the newly selected Klarna method.
If the basket is within limits: the user can complete the checkout, and is redirected directly to the Order Success Page with no additional widget interaction.
If the basket is out of constraints: when the user clicks the "Checkout" button, the Klarna widget reopens, allowing them to select a different valid payment option.
This flow ensures full flexibility for the customer, while maintaining consistency with your shop’s Klarna configuration.
Step 2: Technical Implementation
Before enabling Express Checkout, ensure that all initial checkout setup steps are completed and that the payment methods are properly configured to support Express.
Follow these steps to start the integration:
Web Component Integration
How to integrate the express checkout web component into your shop frontend

SCAYLE Express Checkout Integration
Load the Checkout bundle
To begin, insert the following <script>
tag into the <head>
of your basket page. This script loads the Checkout pre-loader, which includes both the regular checkout and Express Checkout components, along with required assets (CSS, images, etc.):
Do not load Express Checkout from a separate express/js
path.
- Use:
https://.checkout.api.scayle.cloud/frontend/checkout-wc/js?appId=
- Avoid:
https://.checkout.api.scayle.cloud/frontend/express/js?appId=
Add the Express Checkout Component
Place the <scayle-express-checkout>
tag in your basket page where you want the Express Checkout button to appear.
Example:
Attributes
The express component relies on a set of attributes that control its behavior and data handling. Some of these attributes are mandatory for the component to function correctly (e.g., jwt
, device
, and basket-total
), while others are optional.
Attribute name | is Required? | Type | Description |
---|---|---|---|
jwt | Required | String | A valid JWT used to authorize and initiate the transaction. Required for both logged-in and guest users. |
device | Required | web | app | Type of device. The correct value must be provided to avoid errors or disruptions in payment processing. Native apps are mapped as app , while web is used for both desktop and web-view on mobile. |
consent | Required | string | A stringified object indicating the user's cookie consent status for each express payment provider (e.g., PayPal, Klarna). More details available here. Example: "{"paypal": true, "klarna": true}" |
basket-total | Required | String | Total amount of the basket in minor units (cents). E.g., This value is used to check whether the basket total meets the minimum and maximum constraints defined for the payment option, and then determine whether the Express Checkout button should be displayed. |
access-token | Optional | String | This attribute is optional, as guest users will not have an access token. However, if the user is logged in, it is recommended to pass the access token to the web component so that customer information can be pre-filled. If the token is expired or invalid, it can be refreshed dynamically using the invalid-access-token event. |
express-direct-entry | Optional | string | This attribute is used exclusively for Klarna Express and is part of the token handling logic described here. When set to Example: |
As outlined in the feature scope, the Express Checkout does work for unauthenticated (guest) users, therefore a valid jwt must be provided. Find out how to generate the token here.
The access-token is optional and mainly used for pre-filling customer data in case of logged users — it is not required for guest flows. Find out how to generate the token here.
All required string-type attributes (such as jwt
, device
, and basket-total
) must be set before the component is mounted. If the component is rendered without them and you add them afterward (e.g. setting the jwt
later), they will not be recognized and the component will not work correctly.
In contrast, attributes like access-token
, consent
, and basket-total
can be updated dynamically, and the web component will react accordingly.
Events
The express component communicates back with the storefront using events. These events allow you to handle specific scenarios such as token refresh, consent updates, user redirection after payment, and debugging. Some of these events are mandatory to implement, as they are essential for Express Checkout to function correctly. Others are optional and can be used to enhance the customer experience or add additional monitoring and fallback logic.
Below is an overview of the events emitted by the component:
Event name | is Required? | Description |
---|---|---|
consent-missing | Required | Triggered when the consent attribute is sent as false (user consent missing). You must respond by updating the consent attribute accordingly. |
invalid-access-token | Optional | Emitted when the access token is invalid or expired. You must provide a new one by updating the access-token attribute. |
out-of-constraints | Optional | Sent when a payment method does not meet the minimum or maximum order value constraints. The payload includes an array of all the involved paymentKeys . |
payment-start | Optional | Emitted after user clicks on the express payment button. The payload includes the provider and paymentKey of the selected option. |
payment-closed | Optional | Emitted when the user closes the payment widget without completing payment. |
express-checkout-finished | Required | Triggered when the payment authorization step completes. The express checkout only supports the multi-step flow with the Review Page. Therefore, the Payload example:
|
express-error | Optional | A generic error event containing diagnostic details. Useful for logging, monitoring, and user-facing error handling. If the error is due to a failed API request, the payload will additionally include the keys: Error messages are documented below with examples. |
Express button translation
The express checkout buttons may display text such as "Checkout" or "Pay with" alongside the provider logo, as shown here.
- The Klarna button text cannot be configured and is consistent across all tenants and locales globally. Below a list of languages supported and respective translations:
Language | Text Displayed |
---|---|
German | "Bezahlen mit" |
English | "Pay with" |
French | "Payer avec" |
Spanish | "Pagar con" |
Italian | "Pagare con" |
Portuguese (PT) | "Pagar com" |
Dutch | "Betalen met" |
Greek | "Πληρώστε με" |
Swedish | "Betala med" |
Norwegian | "Betal med" |
Danish | "Betal med" |
Finnish | "Maksa" |
Icelandic | "Borga með" |
Polish | "Zapłać z" |
Czech | "Zaplatit s/pomocí" |
Slovak | "Zaplatiť s" |
Hungarian | "Fizetés ezzel" |
Romanian | "Plătește cu" |
Bulgarian | "Плати с" |
Croatian | "Plati s" |
Slovenian | "Plačaj z" |
Estonian | "Maksa millega" |
Latvian | "Maksāt ar" |
Lithuanian | "Mokėti su" |
Albanian | "Paguj me" |
Bosnian | "Plati sa" |
Macedonian | "Плати со" |
Serbian | "Плати са" |
Montenegrin | "Plati sa" |
Turkish | "İle öde" |
Ukrainian | "Платити з" |
Irish | "Íoc le" |
Maltese | "Ħallas b'" |
Catalan | "Paga amb" |
Welsh | "Talu gyda" |
Luxembourgish | "Bezuele mat" |
- The PayPal button text is sourced from the PayPal JS SDK and can be partially customized using the SDK’s configuration parameters (such as the
label
field). More details can be found in the provider's technical documentation.
Handling User Consent for GDPR Compliance
User consent is mandatory to mount most payment SDKs and the express method will not work until this value of consent
attribute is changed to true
.
If the value of attribute is set to false
, any attempt of your customer to proceed to Express Checkout will trigger the consent-missing
event.
The storefront is responsible for handling the consent-missing
event and prompting the user to accept the necessary cookies. Once consent is granted, the storefront must update the consent
attribute on the web component. The component will then automatically load the relevant payment SDK, allowing the user to continue.
If you do not intend to implement consent handling, you can simply pass "true"
for all configured providers in the consent
attribute from the start.
Order Review Page
This section details the implementation of the express checkout review page. It is based on the standard checkout web component.
Make sure all steps from the standard checkout setup are complete
Attributes
Attribute Name | is Required? | Description |
---|---|---|
transaction-id | Required | The transaction ID that is passed into the checkout web component is returned from the express-checkout flow where it is implemented. |
Errors handling
Like any other payment method in the checkout, the express checkout flow may encounter negative scenarios, such as payment declines or invalid address entries on the payment provider's page, among others. The web component will capture these errors and send them to the storefront through the express-error
event, allowing the tenant to decide the appropriate redirection for the user based on the specific issue encountered and desired user experience.
Examples of redirection:
- Order Review Page: All the cases in which, after submitting the payment in the provider page/widget, the user can still have a valid payment/order confirmation attempt. I.e.: incorrect shipping address provided.
- Regular Checkout Page: All the cases in which the user cannot confirm the payment and/or the order in the review page. I.e.: Declined/failed payment in the widget, declined/failed payment upon order confirmation, device not allowed for express checkout, etc.
- Basket Page: All the cases in which the user could not submit the payment in the provider's page/widget. I.e.: user closed/exited the payment widget/page.
It is responsibility of the storefront to handle the express-error
event and prompt the user about the error happened.
The error might be returned from an API response or from the payment widget itself. Depending on the source, the web component will send status codes and/or error messages. Below is a list of the errors and the possible reasons.
API errors
Errors, triggered from API have the keys url
, statusCode
, errorKey
and message
in the express-error
event
Error Key | Status Code | Error Message |
---|---|---|
device_not_supported | 400 | The given device is not allowed |
payment_method_not_available | 424 | The selected payment method is not available |
psp_session_creation_failed | 424 | Failed to create PSP order/session |
failed_to_fetch_session | 424 | Unable to fetch a valid session from the PSP |
basket_not_found | 424 | Failed to fetch basket information |
basket_invalid | 424 | The basket contained no available items |
error_shipping_address_validation_failed | 424 | Shipping address validation failed |
failed_dependency | 424 | Failed to update transaction |
Widget and SDK load errors
Errors, triggered by the payment widget would include only message
alongside with provider
and paymentKey
keys in the express-error
event
Payment Method | Message | Use case |
---|---|---|
All | "User closed the widget or cancel the transaction" | Customer selects express payment in the basket, but closes/cancel the widget before submitting the payment. |
All | "out-of-constraints" | The basket total is outside min/max order value configured for the selected payment method. |
All | "consent-missing" | User did not consent with cookies set for the express checkout. |
Klarna | "The client token is invalid. Make sure it has not been tampered with in any way." | Issues with the client_token value used to initialise the Klarna widget. |
Paypal | "clientId, intent, or currency missing in providerInitializationData" | Merchant and/or order purpose/data it missing. |
Configure Dynamic Fields in the Review Page
The Review Page leverages the same dynamic field configuration used in the regular checkout—no separate structure is introduced. Instead, visibility is controlled using the "alwaysShowOnReviewPage"
flag, which gives you full flexibility over which fields should appear in the final step, helping improve clarity and transparency for users.
For general instructions on how to configure dynamic fields, please refer to the documentation here.
The behavior is as follows:
Type | Configuration Behavior |
---|---|
Optional (non-mandatory) | If a dynamic field is configured as optional, i.e. "enabled": true and "required": false , it will only be shown on the Review Page if you explicitly set the flag "alwaysShowOnReviewPage": true inside the dynamic field configuration. |
Mandatory | If a dynamic field is configured as mandatory, i.e."enabled": true and "required": true ,it will automatically be shown on the Review Page—even without the alwaysShowOnReviewPage flag.However, you may still include the flag explicitly for clarity or consistency. |
Examples of Dynamic Field Configuration on the Review Page
Example 1 - Mandatory Field – Automatically Shown on Review Page
If a field is both enabled and required, it will automatically appear on the Review Page—no extra flag needed.
Without alwaysShowOnReviewPage
:
With alwaysShowOnReviewPage
(optional but valid):
Example 2 - Non-Mandatory Field – Must Use alwaysShowOnReviewPage
If the field is optional, you must set alwaysShowOnReviewPage: true
to display it on the Review Page.
Explanation:
enabled: true
→ field is available in checkoutrequired: false
→ user is not forced to fill italwaysShowOnReviewPage: true
→ ensures it appears in the Review Page
Example 3 - Checkboxes: Optional Newsletter Signup & Mandatory Terms
Explanation:
newsletterSignUp
→ optional checkbox, shown because ofalwaysShowOnReviewPage: true
termsAndPrivacy
→ required checkbox, automatically shown due torequired: true
Example 4 - Text Field: Optional Terms & Privacy Text
Explanation:
This displays the Terms & Privacy text on the Review Page even though it is not required, thanks to the alwaysShowOnReviewPage
flag.
Troubleshooting
Attempt to load Express Component returns empty page / 404 error
- Issue: Tenant attempted to load Express Checkout via a separate script (
/express/js?...
) which returned an empty page. - Root cause: Express Checkout is included in the general preloader script (
/checkout-wc/js?...
) and should not be loaded separately.
PayPal SDK Not Loading / 500 Error
- Issue: PayPal button didn’t render due to a 500 error from the
/payment/methods
endpoint.
- Root cause: Missing PayPal credentials for the shop in the database.
- Resolution: Please ensure credentials are correctly configured for the payment provider in the shop. Reach out to your SCAYLE Account Manager for support.
Footnotes
- requires proper flow chart ↩