Heleket.Sdk
1.0.1
dotnet add package Heleket.Sdk --version 1.0.1
NuGet\Install-Package Heleket.Sdk -Version 1.0.1
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="Heleket.Sdk" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Heleket.Sdk" Version="1.0.1" />
<PackageReference Include="Heleket.Sdk" />
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 Heleket.Sdk --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Heleket.Sdk, 1.0.1"
#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 Heleket.Sdk@1.0.1
#: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=Heleket.Sdk&version=1.0.1
#tool nuget:?package=Heleket.Sdk&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
[]
Heleket.Sdk
.NET SDK for the MVP Heleket payment API surface:
- create payment invoices
- get payment information
- refund payments
- list payment services
- list payment history
- resend and test payment webhooks
- read balances
- validate payment and payout webhook signatures
Non-MVP endpoint families such as static wallets, QR generation, payouts, transfers, discounts, exchange rates, and reference methods are not implemented yet.
Install
dotnet add package Heleket.Sdk
Plain C# Usage
using Heleket.Client;
using Heleket.Configuration;
using Heleket.Payments.Requests;
var client = new HeleketClient(new HeleketOptions
{
MerchantId = "merchant-uuid",
PaymentApiKey = "payment-api-key",
PayoutApiKey = "optional-payout-api-key"
});
ASP.NET Core DI
using Heleket.DependencyInjection;
builder.Services.AddHeleket(options =>
{
options.MerchantId = builder.Configuration["Heleket:MerchantId"]!;
options.PaymentApiKey = builder.Configuration["Heleket:PaymentApiKey"]!;
options.PayoutApiKey = builder.Configuration["Heleket:PayoutApiKey"];
});
// Inject IHeleketClient where needed.
Create Payment
var response = await client.Payments.CreateAsync(new CreatePaymentRequest
{
Amount = "50.00",
Currency = "USD",
OrderId = "order_123",
UrlCallback = "https://example.com/webhooks/heleket"
}, cancellationToken);
if (!response.IsSuccess)
{
Console.WriteLine(response.Message);
return;
}
var invoiceUrl = response.Result?.Url;
Get Payment Info
var response = await client.Payments.GetInfoAsync(new GetPaymentInfoRequest
{
OrderId = "order_123"
}, cancellationToken);
var status = response.Result?.Status ?? response.Result?.PaymentStatus;
Refund Payment
var response = await client.Payments.RefundAsync(new RefundPaymentRequest
{
OrderId = "order_123",
Address = "refund-wallet-address",
IsSubtract = true,
Amount = "50.00"
}, cancellationToken);
Payment Services
var response = await client.Payments.GetServicesAsync(cancellationToken);
if (response.IsSuccess)
{
foreach (var service in response.Result ?? [])
{
Console.WriteLine($"{service.Currency} {service.Network}");
}
}
Payment History
var response = await client.Payments.GetHistoryAsync(new PaymentHistoryRequest
{
DateFrom = "2026-06-01 00:00:00",
DateTo = "2026-06-11 23:59:59"
}, cursor: null, cancellationToken);
var nextCursor = response.Result?.Pagination?.NextCursor;
Balance
var response = await client.Balance.GetAsync(cancellationToken);
var balances = response.Result?.Balances;
Operational Webhook Helpers
await client.Payments.ResendWebhookAsync(new ResendPaymentWebhookRequest
{
OrderId = "order_123"
}, cancellationToken);
await client.Payments.SendTestWebhookAsync(new TestPaymentWebhookRequest
{
OrderId = "order_123",
UrlCallback = "https://example.com/webhooks/heleket"
}, cancellationToken);
Webhook Validation
Validate the raw request body before trusting parsed webhook fields.
using Heleket.Webhooks.Models;
using Newtonsoft.Json;
var rawBody = await new StreamReader(Request.Body).ReadToEndAsync();
if (!client.Webhooks.ValidatePayment(rawBody))
{
return Results.BadRequest();
}
var webhook = JsonConvert.DeserializeObject<HeleketPaymentWebhook>(rawBody);
if (webhook?.Status?.IsSuccessfulFinal(webhook.IsFinal == true) == true)
{
// activate the order
}
return Results.Ok();
For low-level usage, pass the API key explicitly:
using Heleket.Abstractions;
using Heleket.Signing;
using Heleket.Webhooks.Validation;
IHeleketWebhookValidator validator = new HeleketWebhookValidator(new HeleketSigner());
var isValid = validator.Validate(rawBody, paymentApiKey);
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Flurl (>= 4.0.0)
- Flurl.Http (>= 4.0.2)
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Options (>= 9.0.4)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 9.0.0)
- Newtonsoft.Json (>= 13.0.3)
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.1 | 401 | 6/11/2026 |