ZarinpalSharp 1.3.2

.NET Standard 2.1
Install-Package ZarinpalSharp -Version 1.3.2
dotnet add package ZarinpalSharp --version 1.3.2
<PackageReference Include="ZarinpalSharp" Version="1.3.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ZarinpalSharp --version 1.3.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ZarinpalSharp, 1.3.2"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install ZarinpalSharp as a Cake Addin
#addin nuget:?package=ZarinpalSharp&version=1.3.2

// Install ZarinpalSharp as a Cake Tool
#tool nuget:?package=ZarinpalSharp&version=1.3.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.


.NET Standard 2.1 client for zarinpal api v4

Install from Nuget (⚠️ Not fully tested! but i did some on common methods)


For better understanding of what is this and why you should use this, please read Zarinpal docs

Using this package you can simply send a payment request with specified amount of money. customer will pay and you will verify!

How to?

See ConsoleApplication for a quick example

You need MerchantId from Zarinpal Panel

Basic Usage

1- Create a client

// Putout your configurations: MerchantId or Token from
//                             Default callback url 
var token = "YOUR_TOKEN_HERE";
var defaultCallbackUrl = ""; // This can be overrided later.
var configs = new ZarinpalConfiguration(token, defaultCallbackUrl);

// Create main client
var zarinClient = new ZarinClient(configs);

2- Send Requests like PaymentRequestAsync

// Request a payment
var payRequest = await zarinClient.PaymentRequestAsync(20000, "I will pay for you");

// Get a link to pay gateway
var gatewayLink = payRequest.GetStartPaymentUrl()

Supported methods

Almost everything is supported: CardPan, Wages, Currency and ...

Asp .Net

Install ZarinpalSharp.Asp. (Read wiki before installation.)

Then take a look at WebApplication Example


Consider reading Wiki (even if it's empty).

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.1
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on ZarinpalSharp:

Package Downloads

An extension package to use ZarinpalSharp in Asp .Net

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.3.2 109 1/15/2022
1.3.1 59 1/15/2022
1.3.0 114 1/7/2022