Installation & Configuration
The official C# SDK for the Felloh payments API. Use it to manage bookings, transactions, payment links, and all other Felloh resources from your .NET backend.
Installation
The SDK requires .NET 8.0 or later.
Install the SDK
dotnet add package Felloh
Quick Start
Create a FellohClient instance with your API keys. The client implements IDisposable and handles authentication, token
management, retries, and pagination automatically.
Your API keys can be created and managed from the Felloh dashboard. See the API Keys resource for managing keys programmatically.
The FellohClient implements IDisposable. Use a using statement or call Dispose() when you're done to release the underlying HttpClient.
Quick Start
using Felloh;
using var client = new FellohClient(new FellohConfig
{
PublicKey = Environment.GetEnvironmentVariable("FELLOH_PUBLIC_KEY")!,
PrivateKey = Environment.GetEnvironmentVariable("FELLOH_PRIVATE_KEY")!,
});
// List bookings
var bookings = await client.Bookings.ListAsync(new ListBookingsParams
{
Organisation = "your-org-id",
});
foreach (var booking in bookings.Data)
{
Console.WriteLine($"{booking.Id} - {booking.CustomerName}");
}
Configuration Options
The FellohConfig class accepts the following properties.
Properties
- Name
PublicKeyrequired- Type
- string
- Description
Your Felloh public API key.
- Name
PrivateKeyrequired- Type
- string
- Description
Your Felloh private API key.
- Name
BaseUrl- Type
- string
- Description
Base URL for the Felloh API. Defaults to
https://api.felloh.com.
- Name
Timeout- Type
- int
- Description
Request timeout in milliseconds. Defaults to
30000(30 seconds).
- Name
MaxRetries- Type
- int
- Description
Number of automatic retries on 5xx or network errors. Defaults to
2. Uses exponential backoff.
- Name
TokenRefreshBuffer- Type
- int
- Description
Seconds before token expiry to proactively refresh. Defaults to
60.
- Name
Logger- Type
- Action<LogEntry>
- Description
Optional callback invoked after every HTTP request for logging and observability. Receives a
LogEntryobject.
Full Configuration
using Felloh;
using var client = new FellohClient(new FellohConfig
{
PublicKey = "your-public-key",
PrivateKey = "your-private-key",
BaseUrl = "https://api.felloh.com",
Timeout = 30000,
MaxRetries = 2,
TokenRefreshBuffer = 60,
Logger = entry => Console.WriteLine(
$"{entry.Method} {entry.Url} → "
+ $"{entry.StatusCode} ({entry.DurationMs}ms)"
),
});
Token Management
The SDK automatically handles JWT token acquisition and refresh. Tokens are cached in memory and proactively refreshed
before expiry based on the TokenRefreshBuffer setting. No manual token management is needed.
If a request receives a 401 response, the SDK will automatically refresh the token and retry the request once. Token refreshes are thread-safe with concurrent request deduplication.
Available Resources
Every resource on the Felloh API is accessible through a property on the client instance.
| Resource | Client Property | Documentation |
|---|---|---|
| Organisations | client.Organisations | Organisations |
| Bookings | client.Bookings | Bookings |
| Booking Components | client.BookingComponents | Booking Components |
| Transactions | client.Transactions | Transactions |
| Customers | client.Customers | Customers |
| Payment Links | client.PaymentLinks | Payment Links |
| Ecommerce | client.Ecommerce | Ecommerce |
| Refunds | client.Refunds | Refunds |
| Charges | client.Charges | Charges |
| Chargebacks | client.Chargebacks | Chargebacks |
| Credit Notes | client.CreditNotes | Credit Notes |
| Suppliers | client.Suppliers | Suppliers |
| Beneficiaries | client.Beneficiaries | Beneficiaries |
| Disbursements | client.Disbursements | Disbursements |
| Ledger | client.Ledger | Ledger |
| Acquirer Settlement | client.Batches | Acquirer Settlement |
| API Keys | client.ApiKeys | API Keys |
| Audit | client.Audit | Audit |
| AISP | client.Aisp | AISP |
| Scheduled Payments | client.ScheduledPayments | Scheduled Payments |
| Enums | client.Enums | Enums |
