GPay.Sdk
1.0.0
dotnet add package GPay.Sdk --version 1.0.0
NuGet\Install-Package GPay.Sdk -Version 1.0.0
<PackageReference Include="GPay.Sdk" Version="1.0.0" />
<PackageVersion Include="GPay.Sdk" Version="1.0.0" />
<PackageReference Include="GPay.Sdk" />
paket add GPay.Sdk --version 1.0.0
#r "nuget: GPay.Sdk, 1.0.0"
#:package GPay.Sdk@1.0.0
#addin nuget:?package=GPay.Sdk&version=1.0.0
#tool nuget:?package=GPay.Sdk&version=1.0.0
GPay API .NET Client
This is a .NET SDK for the GPay Payment API. It implements all authentication, request signing, and endpoint logic as described in the official API documentation.
Official API Documentation: https://gpay.ly/banking/doc/index.html
Features
- Secure API authentication and request signing (HMAC-SHA256)
- All documented endpoints implemented
- HTTP requests via
System.Net.Http.HttpClient - JSON serialization/deserialization via
System.Text.Json - Idiomatic async/await API surface
Endpoints Supported
- Retrieve Wallet Balance
- Create Payment Request
- Check Payment Status
- Send Money
- Get Day Statement
- Check Wallet
- Get Outstanding Transactions
Requirements
- .NET 8.0+ or any runtime supporting .NET Standard 2.0 (e.g. .NET Framework 4.6.1+, Mono, Unity)
Installation (NuGet)
dotnet add package GPay.Sdk --version 1.0.0
Or via the Package Manager Console:
Install-Package GPay.Sdk -Version 1.0.0
Usage Examples
1. Create the GPayApiClient
using GPay.Sdk.Client;
string apiKey = "YOUR_API_KEY";
string secretKey = "YOUR_SECRET_KEY";
string password = "YOUR_PASSWORD";
var baseUrl = GPayApiClient.BaseUrl.Production; // or BaseUrl.Staging
using var client = new GPayApiClient(apiKey, secretKey, password, baseUrl);
Please refer to the official documentation mentioned above to learn how to acquire the apiKey, secretKey, and password.
The client creates and owns an internal
HttpClientby default. You may pass your ownHttpClient(e.g. one fromIHttpClientFactory) via the optional constructor parameter; in that case the caller owns its lifetime.
2. Retrieve Wallet Balance
using GPay.Sdk.Models;
Balance balance = await client.GetWalletBalanceAsync();
Console.WriteLine($"Balance: {balance.AvailableBalance}");
3. Create Payment Request
PaymentRequest request = await client.CreatePaymentRequestAsync(100.00m, "REF123", "Payment for order");
Console.WriteLine($"Request ID: {request.RequestId}");
4. Check Payment Status
PaymentStatus status = await client.CheckPaymentStatusAsync("REQUEST_ID");
Console.WriteLine($"Is Paid: {status.IsPaid}");
5. Send Money
SendMoneyResult result = await client.SendMoneyAsync(50.00m, "WALLET_GATEWAY_ID", "REF456", "Send to friend");
Console.WriteLine($"Transaction ID: {result.TransactionId}");
6. Get Day Statement
Statement statement = await client.GetStatementAsync("2025-06-22");
Console.WriteLine($"Day Balance: {statement.DayBalance}");
foreach (StatementTransaction txn in statement.DayStatement)
{
Console.WriteLine($"Txn: {txn.TransactionId}, Amount: {txn.Amount}");
}
7. Check Wallet
WalletCheck wallet = await client.CheckWalletAsync("WALLET_GATEWAY_ID");
Console.WriteLine($"Wallet Exists: {wallet.Exists}");
8. Get Outstanding Transactions
OutstandingTransactions outstanding = await client.GetOutstandingTransactionsAsync();
Console.WriteLine($"Outstanding Credit: {outstanding.OutstandingCredit}");
foreach (OutstandingTransaction txn in outstanding.Transactions)
{
Console.WriteLine($"Txn: {txn.TransactionId}, Amount: {txn.Amount}");
}
A complete runnable sample lives in Example/Example.cs. It is excluded
from the compiled library (<Compile Remove="Example\**\*.cs" /> in the .csproj); copy it
into a console project to run it.
Building from Source
dotnet restore
dotnet build -c Release
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- System.Text.Json (>= 8.0.5)
-
net8.0
- System.Text.Json (>= 8.0.5)
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 |
|---|---|---|
| 1.0.0 | 166 | 6/18/2026 |