.NET Standard 2.1 client for zarinpal api v4
Install from Nuget (
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!
See ConsoleApplication for a quick example
You need MerchantId
from Zarinpal Panel
1- Create a client
// Putout your configurations: MerchantId or Token from https://next.zarinpal.com.
// Default callback url
var token = "YOUR_TOKEN_HERE";
var defaultCallbackUrl = "www.example.com"; // 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()
Almost everything is supported: CardPan
, Wages
, Currency
and ...
Install ZarinpalSharp.Asp. (Read wiki before installation.)
Then take a look at WebApplication Example
Consider reading Wiki (even if it's empty).