πiFrame Initialization
Required Parameters
apiKey: Your publishable API key for customer and transaction assignment (also known as the public key).signature: Your HMAC-SHA256 signature of the full query string, base64-encoded. The signature must be the final parameter in the query string. See Server-Side URL Signature for implementation details.currencyCode: The cryptocurrency code for purchase (e.g.,BTC,ETH,BCH). See the documentation for all options. When multiple wallet addresses are provided, this serves as the default cryptocurrency.walletAddress: The destination wallet address for the purchased cryptocurrency.Single address:
walletAddress=ltc1q2k0xaafhgt3s8qw03wmajjmlc8gcepdy0un0ahMultiple currencies: To accept multiple cryptocurrencies, use the format
SYMBOL:addresswith comma separation, e.g.walletAddress=BTC:yourBitcoinAddress,LTC:yourLitecoinAddress,DOGE:yourDogecoinAddress
Optional Parameters
method: Specifies a payment method on load. Value is thepayment_groupmentioned here (e.g.,method=creditcard).baseCurrencyCode: The fiat currency code for transactions (e.g.,USD,EUR,GBP). Supported currencies.lockBaseCurrency:True|FalseLocks currency selection to the specifiedbaseCurrencyCode. Prevents users from selecting other currencies and removes payment methods that don't support the specified currency.baseCurrencyAmount: The fiat amount to spend. Maximum 2 decimal places and cannot be zero. RequiresbaseCurrencyCodeto be set.quoteCurrencyAmount: The cryptocurrency amount to purchase. Maximum 6 decimal places with a minimum equivalent of 7 EUR or 8 USD.email: Pre-fills the customer's email address on the login page.externalCustomerId: Your unique identifier for the customer.redirectUrl: URL for redirection after purchase completion. Must be URL-encoded.Without variables:
redirectUrl=https%3A%2F%2Fwebhook.site%2FSwappedWith dynamic variables:
redirectUrl=https%3A%2F%2Fwebhook.site%2FSwapped%3ForderId%3D%7BorderId%7D%26orderStatus%3D%7BorderStatus%7D
responseUrl: Webhook URL for order notifications. Must be URL-encoded.Additionally, you can define a global callback URL via the Swapped.com dashboard
customerKYC: The customer's Know Your Customer (KYC) verification level:0: No KYC completed1: Proof of ID + Liveness Check2: Proof of ID + Liveness Check + Proof of Address
destinationTag: Adds a numeric destination tag or text memo for recipient identification or transaction context.coverFees:True|FalseSets processing and handling fees to zero for the customer. Fees are instead included in the spread.minAmount: Minimum order amount in EUR. Cannot be lower than 7 EUR.lockAmount:True|FalseLocks the fiat and crypto amount fields, preventing user modification.baseCountry: ISO country code for the user's location. Determines available payment methods.markup: Order markup percentage between 0 and 5. A default global markup can be configured here.submerchant: Submerchant identifier for multi-tenant setups
Server-Side URL Signature
Generate a signature to prevent URL tampering. The signature is created using the query string (including the ?) and your secret key.
Example iFrame URL
Note: this is a test key, your key will be different.
Example iFrame
The iFrame has been optimized for height: 400; width: 482;.
Last updated