This SDK was built by the Afriex DevRel team, winners of our hackathon. We loved what they built so much that it became the official SDK. Big shoutout to the team for making this happen.
Overview
The Afriex SDK is a TypeScript library that wraps the Afriex Business API with full type definitions, built-in retry logic, and modular imports. Every REST endpoint in the API reference has a matching SDK method; the TypeScript snippet appears as a tab in the right-hand code panel on each endpoint page. This page covers what is SDK-specific: install, init, configuration, retries, environments, and webhook signature handling.Installation
Quick Start
1. Initialize the SDK
2. Make your first calls
Configuration
| Option | Type | Default | Description |
|---|---|---|---|
apiKey | string | Required | Your Afriex API key |
environment | string | 'production' | 'staging' or 'production' |
webhookPublicKey | string | (none) | Public key for webhook verification |
retryConfig | RetryConfig | { maxRetries: 0 } | Request retry configuration |
Enable Retries
Retries are disabled by default. Enable them withretryConfig:
Environments
| Environment | Base URL |
|---|---|
| Staging | https://sandbox.api.afriex.com |
| Production | https://api.afriex.com |
Get your API key from the Afriex Dashboard under the Developer tab.
