PayIsland 0.1.0
dotnet add package PayIsland --version 0.1.0
NuGet\Install-Package PayIsland -Version 0.1.0
<PackageReference Include="PayIsland" Version="0.1.0" />
<PackageVersion Include="PayIsland" Version="0.1.0" />
<PackageReference Include="PayIsland" />
paket add PayIsland --version 0.1.0
#r "nuget: PayIsland, 0.1.0"
#:package PayIsland@0.1.0
#addin nuget:?package=PayIsland&version=0.1.0
#tool nuget:?package=PayIsland&version=0.1.0
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/jsonAccept: application/jsonUser-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 | Versions 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. |
-
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 |