SDKs & Libraries
Use the TypeScript SDK or integrate against the REST API directly.
TypeScript / JavaScript
The TypeScript SDK exposes the resource-first treasury, reconciliation, fraud, compliance, and tax surfaces directly.
The SDK targets the public API-key contract only. Dashboard/session routes for shared identity, ecosystems, and internal tooling are intentionally excluded.
Installation
npm install @soledgic/sdk
Usage
import Soledgic from '@soledgic/sdk';
const soledgic = new Soledgic({
apiKey: process.env.SOLEDGIC_API_KEY!,
baseUrl: 'https://api.soledgic.com/v1',
apiVersion: '2026-03-01',
});
const participant = await soledgic.createParticipant({
participantId: 'creator_456',
userId: '9f9b62d2-2f32-4b20-bc24-1f86b16cb9eb',
displayName: 'Jane Creator',
email: 'jane@example.com',
defaultSplitPercent: 80,
});
const checkout = await soledgic.createCheckoutSession({
participantId: 'creator_456',
amount: 2999,
currency: 'USD',
productName: 'Premium asset pack',
successUrl: 'https://example.com/success',
cancelUrl: 'https://example.com/cancel',
});
console.log(checkout.checkoutSession.checkoutUrl);Participant responses include linked-user fields when the public participant is connected to a shared identity record. That linkage is visible through the public participant resource, but the user profile and ecosystem management routes stay internal.
Version Pinning
Even before public versioning matters, the SDK can pin the request header you want to ship against.
const soledgic = new Soledgic({
apiKey: process.env.SOLEDGIC_API_KEY!,
baseUrl: 'https://api.soledgic.com/v1',
apiVersion: '2026-03-01',
});Treasury Helpers
const wallets = await soledgic.listWallets({
ownerId: 'creator_456',
walletType: 'creator_earnings',
});
const holds = await soledgic.listHolds({ participantId: 'creator_456' });
const eligibility = await soledgic.getParticipantPayoutEligibility('creator_456');
const payout = await soledgic.createPayout({
participantId: 'creator_456',
referenceId: 'payout_2026_03_12_001',
amount: 1500,
payoutMethod: 'card',
});
const refund = await soledgic.createRefund({
saleReference: 'sale_123',
reason: 'Customer requested refund',
});Risk, Compliance, and Tax
const evaluation = await soledgic.evaluateFraud({
idempotencyKey: 'risk_eval_checkout_001',
amount: 2999,
category: 'digital_goods',
});
const compliance = await soledgic.getComplianceOverview({ days: 30, hours: 24 });
const unmatched = await soledgic.listUnmatchedTransactions();
const taxDocs = await soledgic.listTaxDocuments(2025);
const taxCalc = await soledgic.calculateTaxForParticipant('creator_456', 2025);
console.log({
fraudSignal: evaluation.evaluation.signal,
highRiskEvents: compliance.overview.highRiskEvents,
unmatchedCount: unmatched.unmatchedCount,
taxDocuments: taxDocs.documents.length,
requires1099: taxCalc.calculation.requires1099,
});REST API
If you are not using the TypeScript SDK, the REST API is the canonical integration surface.
Create a Participant
curl -X POST https://api.soledgic.com/v1/participants \
-H "x-api-key: slk_test_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"participant_id": "creator_456",
"display_name": "Jane Creator"
}'Create a Checkout Session
curl -X POST https://api.soledgic.com/v1/checkout-sessions \
-H "x-api-key: slk_test_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"participant_id": "creator_456",
"amount": 2999,
"currency": "USD",
"success_url": "https://example.com/success"
}'Node.js fetch
const response = await fetch('https://api.soledgic.com/v1/payouts', {
method: 'POST',
headers: {
'x-api-key': process.env.SOLEDGIC_API_KEY!,
'Content-Type': 'application/json',
},
body: JSON.stringify({
participant_id: 'creator_456',
reference_id: 'payout_2026_03_12_001',
amount: 1500,
payout_method: 'card',
}),
});
const result = await response.json();Webhook Helpers
The TypeScript SDK includes webhook helpers for signature verification and payload parsing.
import Soledgic from '@soledgic/sdk';
const soledgic = new Soledgic({
apiKey: process.env.SOLEDGIC_API_KEY!,
baseUrl: 'https://api.soledgic.com/v1',
apiVersion: '2026-03-01',
});
const rawBody = await request.text();
const signature = request.headers.get('x-soledgic-signature') || '';
const isValid = await soledgic.webhooks.verifySignature(
rawBody,
signature,
webhookSecret,
);
const event = soledgic.webhooks.parseEvent(rawBody);
if (event.type === 'payout.executed') {
console.log('Payout completed:', event.data.payout_id);
}const endpoints = await soledgic.listWebhookEndpoints(); const deliveries = await soledgic.getWebhookDeliveries(undefined, 25); const rotated = await soledgic.rotateWebhookSecret(endpoints.data[0].id);