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.

- NuGet Package

- Github Repository


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.

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 LogEntry object.

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.

ResourceClient PropertyDocumentation
Organisationsclient.OrganisationsOrganisations
Bookingsclient.BookingsBookings
Booking Componentsclient.BookingComponentsBooking Components
Transactionsclient.TransactionsTransactions
Customersclient.CustomersCustomers
Payment Linksclient.PaymentLinksPayment Links
Ecommerceclient.EcommerceEcommerce
Refundsclient.RefundsRefunds
Chargesclient.ChargesCharges
Chargebacksclient.ChargebacksChargebacks
Credit Notesclient.CreditNotesCredit Notes
Suppliersclient.SuppliersSuppliers
Beneficiariesclient.BeneficiariesBeneficiaries
Disbursementsclient.DisbursementsDisbursements
Ledgerclient.LedgerLedger
Acquirer Settlementclient.BatchesAcquirer Settlement
API Keysclient.ApiKeysAPI Keys
Auditclient.AuditAudit
AISPclient.AispAISP
Scheduled Paymentsclient.ScheduledPaymentsScheduled Payments
Enumsclient.EnumsEnums