Swipelux
Client-side integration/Widget customization

Widget behavior

Configure behavioral settings for the onramp widget

Auto-close on success

Control whether the widget automatically closes after a successful transaction.

Configuration

const widget = new SwipeluxWidget({
  apiKey: "YOUR_PUBLISHABLE_API_KEY",
  closeOnSuccess: true, // Widget will auto-close on successful transaction
});

Default behavior

By default, closeOnSuccess is false, meaning the widget will remain open after a successful transaction, allowing users to view the confirmation details.

Force new transaction

Force the creation of a new transaction instead of resuming any existing incomplete transactions.

Configuration

const widget = new SwipeluxWidget({
  apiKey: "YOUR_PUBLISHABLE_API_KEY",
  forceNewTransaction: true, // Always create a new transaction
});

Use cases

This setting is useful when you want to ensure that each widget interaction creates a fresh transaction, regardless of any previous incomplete transactions associated with the user.

Widget URL override

Override the default widget hosting URL. This is typically used for testing with staging environments.

Configuration

const widget = new SwipeluxWidget({
  apiKey: "YOUR_PUBLISHABLE_API_KEY",
  widgetUrl: "https://staging.swipelux.com", // Custom widget URL
});

Default value

The default widgetUrl is "https://app.swipelux.com". Only override this if you've been provided with a specific URL for testing or custom deployment purposes.

On this page