Query parameters

Here is a full list of query parameters for the SwapinWidget API. Customize and enhance your API integration with these parameters to deliver a tailored user experience.

Query NameTypeDefault valueDescription

apiKey

string

Your Swapin API Key. Required

services

string

BUY,SELL

Comma separated list on available services

defaultService

string

BUY

The service that is opened by default

cryptoCurrencyCode

string

The code of the cryptocurrency you want the customer to sell or buy. If you pass a cryptoCurrencyCode, the crypto currency will be selected by default and the customer won't be able to select another crypto currency. The list of supported crypto currencies

defaultCryptoCurrencyCode

string

ETH

The default cryptocurrency will be selected, but the customer will be able to select another crypto currency. The list of supported crypto currencies

cryptoCurrencyList

string

A comma-seperated list of crypto currency codes that are available for customer. Example: USDT.TRC20, USDT.ERC20, ETH, BTC. The list of supported crypto currencies

fiatCurrencyCode

string

The code of the fiat currency that is available to receive. The list of supported fiat currencies

fiatAmount

number

A numeric amount customer wants to receive. The customer can't change the fiat amount if this is passed.

defaultFiatAmount

number

500

A numeric amount customer wants to receive. The customer can change the fiat amount if needed.

cryptoAmount

number

An amount customer wants to buy or sell. Customers cannot change the crypto amount if this is passed. This parameter will be skipped if cryptoCurrencyCode is not passed.

defaultCryptoAmount

Number

A numeric amount customer wants to sell or buy. The customer can change the crypto amount if needed. This parameter is ignored if defaultFiatAmount is passed.

network

string

Blockchain network for service. The customer can not change the network.

defaultNetwork

string

Default blockchain network for service. The customer can change the network.

walletAddress

string

The blockchain address where bought crypto is sent. The customer can not change the address.

defaultWalletAddress

string

Default wallet address that customer can change.

email

string

The email will be used to identify your customer and their order (usually the email they registered with your app).

partnerOrderId

string

An order ID will identify the transaction once a webhook is called back to your app. This can be your identifier to track your customers.

partnerCustomerId

string

A customer ID will identify the customer who made the transaction once a webhook is called back to your app.

redirectURL

string

Swapin will redirect to this URL once the customer completes their purchase/sell process. Please pass the valid URL or it will not work.

themeColor

string

The theme color code for the widget main color. It is used for buttons, links and highlighted text. Only hexadecimal codes are accepted. // Coming soon

widgetHeight

number

Height of the widget in px // Coming soon

widgetWidth

number

Width of the widget in px // Coming soon

Last updated