LyteWire Developer Tools
Integrate LyteWire into your application with our official SDKs. Available for JavaScript, Python, PHP, Shopify, and WooCommerce with full API coverage.
Official JavaScript/Node.js SDK for LyteWire Enterprise API with full feature whitelist support
npm install @lytewire/sdkyarn add @lytewire/sdk<script src="https://cdn.lytewire.com/sdk/v2/lytewire.min.js"></script>Get started with the JavaScript SDK in minutes
import { LyteWireAPI } from '@lytewire/sdk';
// Initialize the client
const lytewire = new LyteWireAPI({
tenantId: 'your-tenant-id',
apiKey: 'your-api-key',
environment: 'sandbox' // or 'production'
});
// Check enabled features for your tenant
const features = await lytewire.getEnabledFeatures();
console.log('Enabled features:', features);
// Send payment via social identifier
const payment = await lytewire.sendSocialPayment(
'+971501234567', // phone, email, @twitter:user, etc.
100.00,
'AE_COIN',
'Payment for services'
);
// Create a wallet
const wallet = await lytewire.createWallet({
external_id: 'user-123',
label: 'Primary Wallet'
});
// Get balance
const balance = await lytewire.getBalance(wallet.wallet_id);Webhooks, batch operations, and framework integrations
// Feature Whitelist Management
const tiers = await lytewire.getFeatureTiers();
await lytewire.applyFeatureTier('professional');
// Check if feature is enabled before use
if (await lytewire.isFeatureEnabled('social_twitter')) {
await lytewire.sendSocialPayment('@twitter:recipient', 50, 'FDUSD');
}
// Business Account with Approval Workflow
const business = await lytewire.createBusinessAccount(
'Acme Corp',
'technology',
'UAE',
10000, // approval threshold
['0x123...', '0x456...'] // approvers
);
const payment = await lytewire.initiateBusinessPayment(
business.id,
'recipient@email.com',
15000,
'USDT'
);
// Returns { status: 'pending_approval', payment_id: '...' }
// Webhook verification
import { verifyWebhookSignature } from '@lytewire/sdk';
app.post('/webhook', (req, res) => {
const signature = req.headers['x-lytewire-signature'];
if (verifyWebhookSignature(req.body, signature, webhookSecret)) {
const { event_type, data } = req.body;
// Handle: payment.completed, approval.pending, identity.linked
res.status(200).send('OK');
} else {
res.status(401).send('Invalid signature');
}
});Complete API documentation with all endpoints, parameters, and response formats.
View API DocsTest your integration in our sandbox environment with test API keys.
Get Test KeysSample projects and integration examples in our GitHub repository.