Loading…
Complete guide to integrating TrustVerify SDK into your applications
Start building secure transactions with TrustVerify SDK in minutes
npm or pip install
Configure with API key
Create your first transaction
npm install @trustverify/sdkimport { TrustVerify } from '@trustverify/sdk';
const trustVerify = new TrustVerify({
apiKey: 'your_api_key_here',
environment: 'production' // or 'sandbox'
});const transaction = await trustVerify.transactions.create({
title: 'Website Development Project',
description: 'Custom e-commerce website development',
amount: 2500.00,
currency: 'USD',
buyerEmail: 'buyer@example.com',
sellerEmail: 'seller@example.com',
category: 'digital_services',
deliveryTimeframe: '7_days'
});
console.log('Transaction created:', transaction.id);const verification = await trustVerify.kyc.submitVerification({
userId: 'user_123',
documentType: 'passport',
documentNumber: 'P123456789',
personalInfo: {
firstName: 'John',
lastName: 'Doe',
dateOfBirth: '1990-01-01',
address: {
street: '123 Main St',
city: 'New York',
country: 'US',
postalCode: '10001'
}
},
documents: {
frontId: 'base64_encoded_image',
backId: 'base64_encoded_image',
selfie: 'base64_encoded_image'
}
});const fraudResult = await trustVerify.fraud.analyze({
transactionId: 'txn_123',
userAgent: req.headers['user-agent'],
ipAddress: req.ip,
deviceFingerprint: 'device_fingerprint_hash',
behaviorData: {
sessionDuration: 120,
clickPattern: 'normal',
typingSpeed: 'average'
}
});
if (fraudResult.riskScore > 0.8) {
// High risk - requires additional verification
console.log('High risk transaction detected');
}Check out our API reference or contact our developer support team.