Wirepayment 1.0.0
dotnet add package Wirepayment --version 1.0.0
NuGet\Install-Package Wirepayment -Version 1.0.0
<PackageReference Include="Wirepayment" Version="1.0.0" />
<PackageVersion Include="Wirepayment" Version="1.0.0" />
<PackageReference Include="Wirepayment" />
paket add Wirepayment --version 1.0.0
#r "nuget: Wirepayment, 1.0.0"
#:package Wirepayment@1.0.0
#addin nuget:?package=Wirepayment&version=1.0.0
#tool nuget:?package=Wirepayment&version=1.0.0
Wirepayment
Official .NET server-side SDK for the Wire payment API. Targets .NET 8, with zero third-party dependencies (built on System.Net.Http and System.Text.Json).
Install
dotnet add package Wirepayment
Quickstart
using Wire;
using var wire = new WireClient("sk_live_...");
// Amounts are in minor units (integer).
var pi = await wire.PaymentIntents.CreateAsync(new PaymentIntentCreateParams
{
Amount = 50000,
Currency = "MNT",
AllowedOperators = new[] { "sandbox" }, // the operator ids enabled on your account
});
var confirmed = await wire.PaymentIntents.ConfirmAsync(pi.Id);
Console.WriteLine($"{confirmed.Id} {confirmed.Status}");
Auto-pagination
await foreach (var charge in wire.Charges.ListAsync(new ListParams { Limit = 50 }))
{
Console.WriteLine(charge.Id);
}
Webhook verification
Always verify on the raw, unparsed request body.
using Wire;
// rawBody is the unparsed request body (string or byte[]).
// header is the value of the WirePayment-Signature request header.
var ev = Webhooks.Verify(rawBody, header, endpointSecret);
Console.WriteLine(ev.Type);
Webhooks.Verify throws SignatureVerificationException on any mismatch, malformed header,
or timestamp outside tolerance (default 300s). It fails closed.
Errors
using Wire;
try
{
await wire.PaymentIntents.CreateAsync(new PaymentIntentCreateParams { Amount = -1 });
}
catch (WireException e)
{
Console.WriteLine($"{e.Code} {e.RequestId} {e.StatusCode}");
}
Network and timeout failures surface as WireConnectionException (a subclass of WireException).
The API key is never logged nor included in any exception.
Configuration
using var wire = new WireClient("sk_live_...", new WireClientOptions
{
BaseUrl = "https://api.wire.mn", // default
Timeout = TimeSpan.FromSeconds(30),
MaxRetries = 2,
// HttpClient = myHttpClient, // inject your own
// HttpMessageHandler = myHandler, // or a custom handler
});
Requests are retried with exponential backoff and jitter on 429, 5xx, and network errors,
honoring Retry-After. POST requests carry an Idempotency-Key (generated if not supplied),
reused across retries.
Documentation
Full API documentation: docs.wire.mn.
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 |
|---|---|---|
| 1.0.0 | 122 | 6/7/2026 |