Webhook
Swapper Finance Deposits Webhook
Quick Start
1. Add Webhook URL
import { SwapperIframe } from '@swapper-finance/deposit-sdk';
const swapper = new SwapperIframe({
container: '#swapper-container',
integratorId: 'your-integrator-id',
dstChainId: '8453',
dstTokenAddr: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',
depositWalletAddress: '0x2A018F2506acaEEE2C10632514Fc5DCa9eE2c28A',
webhookUrl: "https://domain/com/api/webhook" // <--- here
});2. Handle Notifications
app.post('/webhooks/deposit', (req, res) => {
const { eventId, eventType, data } = req.body;
if (eventType === 'transaction.completed') {
console.log('Swap completed:', data.txHash);
// Update your database, notify users, etc.
}
res.json({ received: true });
});3. Requirements
Event Payload
Field Descriptions
Field
Type
Description
Webhook Signature Verification
Troubleshooting
Common Issues
Issue
Solution
Support
Last updated