Appearance
Payment methods (Core)
After loadSession(), list wallets and exchanges for the session.
Fetch
ts
import {
createSwappedConnectClient,
IntegrationProvider,
IntegrationProviderType,
} from '@swapped/connect-sdk';
const client = createSwappedConnectClient({ sessionId: 'your-session-id' });
await client.loadSession();
const exchanges = await client.paymentMethods.get({ category: 'exchanges' });
const wallets = await client.paymentMethods.get({ category: 'wallets' });
// → Wallets flow (type: wallet)
const binance = exchanges.find(
method => method.provider === IntegrationProvider.Binance,
);
const coinbase = exchanges.find(
method => method.provider === IntegrationProvider.Coinbase,
);
if (binance) {
// → Exchange Pay with IntegrationProvider.Binance
}
if (coinbase) {
// → Coinbase OAuth withdraw flow (type: exchange_oauth), not Exchange Pay
}
const exchangePayOnly = await client.paymentMethods.get({
type: IntegrationProviderType.ExchangePay,
});Use refetch({ category: 'exchanges' }) when you need a fresh list from the API.
Filters
| Field | Example |
|---|---|
category | 'exchanges' or 'wallets' |
type | IntegrationProviderType.Wallet, IntegrationProviderType.ExchangePay, or [IntegrationProviderType.ExchangePay, IntegrationProviderType.ExchangeOauth] |
Next
- Wallets (
type: wallet) - Exchange Pay (
type: exchange_pay) - Coinbase (
type: exchange_oauth)