docs

Payment Methods (hidden)

Introduction

Handling payment methods in SCAYLE Checkout involves interaction between the backend API and frontend payment SDKs. The Checkout state response includes:

  • A list of available payment options
  • The currently selected payment option
  • Flags such as isDisabled: true, which indicate that a payment method should be either hidden or grayed out in the UI

Payment methods will only appear after a billing address has been set — either manually or via prefilled customer data.

The initially selected method is based on:

  • The payment option used in the previous order (if applicable)
  • Or default business rules for new customers

Typical Flow

  • Display Available Payment Methods
    Retrieve the list of available payment options from the state response and render them in your UI. Some methods may be marked as isDisabled, in which case you should decide whether to hide or disable them visually.
  • Customer Selects a Payment Method
    Once a customer selects a payment method, trigger a select payment method request and load the corresponding Payment Service Provider (PSP) SDK in your frontend. This SDK is responsible for handling customer inputs (e.g. card details, redirect flows, wallet integrations, etc.).
  • Synchronize with SCAYLE Checkout
    After completing PSP-specific logic (e.g. token generation or session confirmation), send the relevant data back to SCAYLE Checkout using the Update Payment Method endpoint. This ensures that the payment is linked correctly to the ongoing checkout session.

Available Payment Service Providers

SCAYLE Checkout offers out-of-the-box integration with several leading Payment Service Providers (PSPs), enabling merchants to provide a seamless and localized payment experience. Supported PSPs include:

Showing Payment Methods

Available payment methods and the selected payment method are included in the state response.

Location in State

  • Available Shipping options
    • orderOptions.payment.generic
  • Selected shipping option
    • orderState.payment.selected

Select Payment Method

This endpoint allows you to select a payment option for the current order.

  • The selected payment option must be available and not marked as disabled in the state response.
  • Depending on the payment service provider, payment method, and integration type, additional steps may be required (e.g. tokenization, 3DS flows, etc.) after selection.

Tip: Always ensure the billing address is set before attempting to select a payment method—payment options are only available once the billing address has been provided.

Update Payment Method

This endpoint is used to update the payment flow with transactional data received from frontend Payment Service Provider (PSP) SDKs.

  • It is only required for certain payment providers and methods that need additional verification or initialization steps (Klarna, etc.).
  • The data you send here typically includes tokens, session IDs, or device identification values provided by the PSP.

⚠️ Only use this endpoint if explicitly required by the selected payment method or its integration documentation.