General widget settings

The following settings allow you to customize the checkout behavior and appearance to suit each merchant's specific needs.

📘

Contact your DEUNA TPM to apply any of these settings.

Language

The checkout interface language is automatically configured based on the country in which your business operates.

This setting aims to ensure a localized experience for shoppers, reducing friction and improving conversion rates.

  • The language is defined through the tokenization of orders.
  • Language can be dynamically specified for each order.

Base URL

If you'd like to customize a specific base URL for your payment links, then you can request it from our support team. This customization allows you to tailor the experience to your brand identity.

Example: https://payhere.yourbrand.deuna.com

Enable user authentication

DEUNA lets you configure whether your shoppers complete checkout as guests or as authenticated users, with access to their saved cards and previous purchase data. This behavior is controlled by two variables:

VariableTypeDescription
user_authentication_flowbooleanEnables the authenticated user flow (login, OTP, saved cards).
init_with_guest_userbooleanEnables the guest user flow (no login).
📘

user_authentication_flow and init_with_guest_user must always be configured as opposite values (truefalse) for the widget to work correctly.

Both variables are configured inside widgets_general_config.user_experience when creating or updating your merchant configuration:

{
  "widgets_general_config": {
    "user_experience": {
      "user_authentication_flow": true,
      "init_with_guest_user": false
    }
  }
}
👉

To display saved cards, the user must have previously saved cards. If the user is authenticated but never saved a card, checkout won't show any, even with the authenticated flow enabled.

How is it decided whether a user sees the authenticated flow?

If you set user_authentication_flow: true, DEUNA determines which user to show (and therefore, which saved cards) following a priority order. A value defined at a higher level always overrides the levels below it:

PrioritySourceDescription
1(highest)Query param userTokenIf the merchant explicitly sends a userToken when initializing the widget, that user is used regardless of any other configuration.
2Merchant configurationIf no userToken is sent, the configuration defined in widgets_general_config.user_experience is used.
3 (lowest)Order / billing emailIf there's no userToken and no applicable configuration, the decision is based solely on the email received in the order or billing data.

Example — initializing with an explicit userToken:

deunaSDK.initCheckout({
  orderToken: "YOUR_ORDER_TOKEN",
  userToken: "YOUR_USER_TOKEN", // overrides merchant config and order email
  // ...other initialization parameters
});

Overriding at initialization: onlyCardEnrollment

Parameters sent inside behavior when initializing the WebSDK let you override certain flows defined in your merchant configuration, without changing that configuration itself.

onlyCardEnrollment hides an authenticated user's saved cards, allowing only the enrollment of a new card. This is recommended when the merchant manages the display of the user's saved cards from their own UI, and only needs DEUNA to handle the card-enrollment form.

onlyCardEnrollment overrides the outcome of the priority table above: even if a userToken or an active user_authentication_flow would normally show saved cards, this flag forces them to stay hidden for that session.

External authorizer (userToken)OTP (user_authentication_flow)onlyCardEnrollmentSaved cards visible?

Example — Vault Widget WebSDK configuration:

await DeunaSDK.initElements({
  orderToken: "<ORDER_TOKEN>",
  userToken: "<AUTHENTICATION_TOKEN>",
  userInfo: { /* ... */ },
  behavior: {
    onlyCardEnrollment: true,
    // ...other behavior overrides
  },
  callbacks: { /* ... */ },
  },
});
📘

Find more details about the SDK initialization parameters in Web SDK

Enable card saving

Besides deciding whether a user checks out as a guest or as an authenticated user, you can configure how card-saving behaves during payment.

VariableTypeDescription
show_saved_cards_flowbooleanDisplays a checkbox that lets the shopper decide whether to save their card during payment. When disabled (false, the default), the card is saved automatically without asking, which improves conversion on future purchases.
default_card_flowbooleanDisplays an additional checkbox letting the user decide whether that card should be marked as the default for future purchases. Disabled by default.

Both variables are also configured inside widgets_general_config.user_experience:

{
  "widgets_general_config": {
    "user_experience": {
      "show_saved_cards_flow": true,
      "default_card_flow": true
    }
  }
}
📘

The "default card" checkbox (default_card_flow) only makes sense for non-guest (authenticated) users with at least one saved card — if the shopper checks out as a guest, this option doesn't apply.

Enable card saving

It is possible to display a checkbox that allows the shopper to decide whether to save their card at checkout. This option is useful in guest flows.

The default behavior is not to display the checkbox and automatically save the card to improve conversion.

Visual styles

Customize your widget using CustomStyle.

Adapt your customers' visual experience to your brand guidelines.

📘

For more information about styles, refer to Customizing styles.


Did this page help you?