PayIsland 0.1.0

dotnet add package PayIsland --version 0.1.0
                    
NuGet\Install-Package PayIsland -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PayIsland" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PayIsland" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="PayIsland" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PayIsland --version 0.1.0
                    
#r "nuget: PayIsland, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package PayIsland@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PayIsland&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=PayIsland&version=0.1.0
                    
Install as a Cake Tool

PayIsland .NET SDK

Official .NET SDK for integrating with PayIsland payment APIs.

Installation

dotnet add package PayIsland

Initialization

using PayIsland;

var payIsland = new PayIslandClient("test_secret_key");

PayIsland uses your API key to determine sandbox or live mode. The SDK does not expose a separate environment flag.

Transaction Initialization

using PayIsland;

var payIsland = new PayIslandClient("test_secret_key");

var response = await payIsland.Transactions.InitializeAsync(new Dictionary<string, object?>
{
    ["callback_url"] = "https://example.com/webhooks/payislands",
    ["payment_item_id"] = "6",
    ["transaction_reference"] = $"order_{DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()}",
    ["channel"] = "card",
    ["amount"] = "1000",
    ["customer_info"] = new Dictionary<string, object?>
    {
        ["email"] = "ada@example.com",
        ["phone_number"] = "08011112222",
        ["first_name"] = "Ada",
        ["last_name"] = "Lovelace"
    }
});

Console.WriteLine(response);

For card transactions, PayIsland may return a pending state while 3DS or another customer authorization step is in progress. Redirect the customer to the authorization URL when one is returned, then verify the transaction reference before fulfillment.

Transaction Verification

var response = await payIsland.Transactions.VerifyAsync("order_123");
Console.WriteLine(response);

This sends:

GET /api/v1/transactions/in/check-transaction-status/{reference}

Webhook Verification

var isValid = payIsland.Webhooks.VerifySignature(
    rawPayload,
    signature,
    webhookSecret
);

Always verify the webhook signature and verify the transaction reference with PayIsland before fulfillment.

Error Handling

The SDK throws PayIslandApiException for non-success API responses.

using PayIsland.Exceptions;

try
{
    var response = await payIsland.Transactions.VerifyAsync("order_123");
}
catch (PayIslandApiException exception)
{
    Console.WriteLine(exception.StatusCode);
    Console.WriteLine(exception.ResponseBody);
}

Configuration

var payIsland = new PayIslandClient(new PayIslandConfig("test_secret_key")
{
    BaseUrl = "https://ags.payislands.com",
    TimeoutSeconds = 30
});

Default headers sent by the SDK:

  • Authorization: Bearer <secretKey>
  • Content-Type: application/json
  • Accept: application/json
  • User-Agent: payisland-dotnet

Examples

Set environment variables from .env.example, then run:

dotnet run --project examples/PayIsland.Examples
dotnet run --project examples/PayIsland.Examples -- verify <transaction_reference>
dotnet run --project examples/PayIsland.Examples -- webhook

Development Commands

dotnet restore
dotnet build
dotnet test
dotnet pack -c Release

NuGet Publishing

dotnet pack -c Release
dotnet nuget push src/PayIsland/bin/Release/PayIsland.0.1.0.nupkg \
  --api-key <NUGET_API_KEY> \
  --source https://api.nuget.org/v3/index.json

License

MIT

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 127 5/22/2026