SDK Overview
Crowd.Credit provides official SDKs in six languages, making it easy to integrate the platform into your application regardless of your tech stack.
Available SDKs
| Language | Package | Version | Install |
|---|---|---|---|
| TypeScript | @crowd-credit/sdk | 0.1.0 | npm install @crowd-credit/sdk |
| Python | crowd-credit | 0.1.0 | pip install crowd-credit |
| Go | github.com/crowdpay/crowd-credit-go | 0.1.0 | go get github.com/crowdpay/crowd-credit-go |
| C# | CrowdCredit.SDK | 0.1.0 | dotnet add package CrowdCredit.SDK |
| Java | io.crowdcredit:sdk | 0.1.0 | Maven/Gradle (see below) |
| Swift | CrowdCreditSDK | 0.1.0 | Swift Package Manager |
Quick Start
All SDKs follow the same pattern:
- Initialize the client with your API key
- Call methods that map to API endpoints
- Handle responses and errors
TypeScript Example
import { CrowdCreditClient } from '@crowd-credit/sdk';
const client = new CrowdCreditClient({
apiKey: process.env.CROWD_CREDIT_API_KEY,
});
// Get account details
const account = await client.accounts.me();
// Get credit line info
const credit = await client.credit.getLine();
console.log(`Available credit: $${credit.available}`);
// Get yield summary
const yield = await client.yield.getSummary();
console.log(`Total earned: $${yield.totalEarned}`);
Common Features
All SDKs provide:
- Type-safe requests and responses -- Full type definitions for all endpoints
- Automatic retries -- Configurable retry logic with exponential backoff
- Rate limit handling -- Automatic rate limit detection and retry
- Error mapping -- API errors mapped to language-specific exceptions
- Webhook signature verification -- Helper functions for verifying webhook payloads
Configuration Options
| Option | Default | Description |
|---|---|---|
apiKey | required | Your API key |
baseUrl | https://api.crowd.credit | API base URL |
timeout | 30000 | Request timeout in milliseconds |
retries | 3 | Maximum retry attempts |
debug | false | Enable debug logging |
Next Steps
Choose your language for detailed setup and usage instructions: