Testing and production access
Every browser integration must be registered with SilentSwap. Registration binds an issued
integratorId to exact browser origins and to the fee configuration controlled by
SilentSwap. Integrators cannot choose their own fee percentage, fee split, or payout address in
SDK calls.
Configure the client
SilentSwap supplies the integrator ID after approving the integration and its origins. Configure it once on the client, not on individual quotes:
import { createSilentSwapClient } from '@silentswap/sdk';
const client = createSilentSwapClient({
integratorId: 'int_0123456789abcdef01234567',
});
void client;An unknown, inactive, or origin-mismatched ID is rejected by the API.
Test from localhost
Every active integrator is allowed from these development origins by default:
http://localhost:3000
http://127.0.0.1:3000Run the browser integration on port 3000 and configure the issued
integratorId. Local origins are shared, so the ID is required to select the correct
integrator configuration. Other ports are not allowlisted.
These localhost defaults grant browser access to the production API. They are not a sandbox:
- requesting and rendering quotes does not move funds;
placeOrder()can request approvals and submit real-network transactions;- use a deliberately small amount and explicit real-funds safeguards for execution tests.
SilentSwap does not currently provide a no-money testnet environment.
Get whitelisted for production
Before launch, send SilentSwap support every exact HTTPS production origin. Include each scheme, subdomain, and non-default port separately:
https://swap.example.com
https://www.example.comDo not send page URLs such as https://swap.example.com/swap; origins never contain a
path. Preview-deployment domains must be registered individually because wildcard domains are not
allowed.
Production browser calls will fail until the origin is whitelisted and attached to the active integrator ID. Node and server-to-server clients do not encounter browser CORS, but they still need a registered integrator ID for SilentSwap-managed fees.
Verify browser access
After SilentSwap confirms the origin, verify the preflight before testing the full flow:
curl -i -X OPTIONS https://api.silentswap.com/health \
-H 'Origin: https://swap.example.com' \
-H 'Access-Control-Request-Method: GET'The response should include:
Access-Control-Allow-Origin: https://swap.example.comContinue with the quickstart, then test quote review, wallet rejection, tracking teardown, and refund error handling before enabling real execution for users.