SDKs & Libraries
Official SDKs and community libraries for easy integration with XferAPI's atomic transfer system. Choose your preferred language and get started quickly.
Early Access Program
XferAPI is currently in private beta. Contact our team to get access to SDKs and start integrating atomic transfers into your applications.
Official SDKs
Node.js SDK
BetaOfficial Node.js SDK with full TypeScript support, async/await, and built-in retry logic.
npm install @xferapi/node-sdk
Python SDK
BetaPythonic SDK with type hints, async support, and integration with popular frameworks like Django and FastAPI.
pip install xferapi-python
PHP SDK
Coming SoonModern PHP SDK with PSR compliance, Guzzle HTTP client, and Laravel integration.
Go SDK
Coming SoonHigh-performance Go SDK with context support, structured logging, and excellent concurrency.
Quick Examples
Node.js Example
const XferAPI = require('@xferapi/node-sdk');
const client = new XferAPI({
apiKey: 'your_api_key',
apiSecret: 'your_api_secret'
});
async function transferCredits() {
try {
const result = await client.transfer({
transferId: 'txn_001',
useHalfSuccess: true,
fromAccounts: [{
accountId: 'user_123',
itemType: 'credits',
amount: 100,
changeType: 'debit'
}],
toAccounts: [{
accountId: 'user_456',
itemType: 'credits',
amount: 100,
changeType: 'credit'
}]
});
console.log('Transfer successful:', result);
} catch (error) {
console.error('Transfer failed:', error);
}
}
Python Example
import asyncio
from xferapi import XferAPIClient
client = XferAPIClient(
api_key='your_api_key',
api_secret='your_api_secret'
)
async def transfer_credits():
try:
result = await client.transfer(
transfer_id='txn_001',
use_half_success=True,
from_accounts=[{
'account_id': 'user_123',
'item_type': 'credits',
'amount': 100,
'change_type': 'debit'
}],
to_accounts=[{
'account_id': 'user_456',
'item_type': 'credits',
'amount': 100,
'change_type': 'credit'
}]
)
print(f'Transfer successful: {result}')
except Exception as error:
print(f'Transfer failed: {error}')
asyncio.run(transfer_credits())
Community Libraries
Community Contributions Welcome
We encourage community contributions for additional language bindings and framework integrations. Let us know what you're building!
Ready to Start Building?
Join our private beta and get early access to XferAPI SDKs. We'll provide you with API credentials, SDK access, and dedicated support during integration.