Supported widget settings
Overview
The Swipelux widget can be customized through various configuration options to match your application's needs. Below is the complete reference of available settings:
Example implementation
In this article, all of the example implementations will be based on the client-side integration using the JavaScript SDK.
For brevity, the following examples will only show the constructor configuration for SwipeluxWidget
. The full implementation remains the same as shown in the basic example above.
Customizing the widget's appearance
Colors
Customize the widget's appearance by modifying color values. All colors are optional and support the following formats:
- HEX (e.g.,
#F24F21
) - RGB (e.g.,
rgb(213 47 47)
) - HSL (e.g.,
hsl(0deg 0% 0%)
)
Supported color keys and their default values
Example usage
Mapping your orders
Order token
The orderToken
parameter is used to initiate the widget with a prepared order created using our REST API.
Example usage
External ID
The externalId
parameter allows you to link Swipelux orders to your own system's order IDs or references.
Requirements
- Maximum length: 64 characters
Example usage
Specifying payment and receive currencies
Payment currency
Specify the fiat currency that will be used for payment processing. This setting determines which currency your users will pay with when using the widget.
For example, if you set this to USD
, users will make payments in US dollars.
Example usage
Payment channel
Specify the payment channel that will be used for payment processing. This setting determines which payment method your users will use when using the widget.
For example, if you set this to OPEN_BANKING
, users will skip the payment method selection step and initiate the payment process using Open Banking immediately after confirming the order.
Supported payment channels
OPEN_BANKING
- Use the Open Banking payment method.CARD_PAYMENT
- Use the card payment method.WIRE_TRANSFER
- Use the bank wire transfer payment method.APPLE_PAY
- Use the Apple Pay payment method. This payment method is only available for users with an Apple Pay-enabled device. If it's not available, the user will be forced to select another payment method.
Example usage
Receive currency
Specify the cryptocurrency that you want to receive when users make a purchase through the widget. This can be configured either as a simple currency code or with additional protocol specifications for tokens.
Example usage
Pre-filling user information
You can pre-fill user information and order amounts using the defaultValues
property to enhance the user experience.
For each field (except fiatAmount
), you can specify whether it should be editable or locked, giving you control over which information users can modify.