Swipelux
Client-side integration/Widget customization

Payment and receive currencies

Configure payment and receive currencies for the onramp widget

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

const widget = new SwipeluxWidget({
  apiKey: "YOUR_PUBLISHABLE_API_KEY",
  availablePayCurrency: "USD",
});

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

const widget = new SwipeluxWidget({
  apiKey: "YOUR_PUBLISHABLE_API_KEY",
  paymentChannel: "OPEN_BANKING",
});

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.

Simple configuration

const widget = new SwipeluxWidget({
  apiKey: "YOUR_PUBLISHABLE_API_KEY",
  availableReceiveCurrency: "ETH"
});

With protocol specification

const widget = new SwipeluxWidget({
  apiKey: "YOUR_PUBLISHABLE_API_KEY",
  availableReceiveCurrency: {
    code: "USDC",
    protocol: "MATIC"
  }
});

Common protocol examples

  • ERC20 - Ethereum-based tokens
  • MATIC - Polygon network
  • BEP20 - Binance Smart Chain
  • AVAX-C - Avalanche C-Chain
  • ARB - Arbitrum

Type definitions

export type PaymentChannel =
  | "OPEN_BANKING"
  | "CARD_PAYMENT"
  | "WIRE_TRANSFER"
  | "APPLE_PAY";
 
export type CurrencyReference = {
  code: string;
  protocol?: string;
};

On this page