Skip to main content
Version: 4.0

Zibal

dotnet add package Parbad.Gateway.Zibal

The Zibal gateway for Parbad, the online payment library for .NET.

Configuration​

builder.Services.AddParbad()
.ConfigureGateways(gateways =>
{
gateways
.AddZibal()
.WithAccounts(accounts =>
{
accounts.AddInMemory(account =>
{
account.Merchant = "<Your merchant ID>";
account.IsSandbox = false; // true: Zibal's sandbox
});
});
})
// ...

Payment request​

var result = await onlinePayment.RequestAsync(invoice =>
{
invoice
.SetAmount(amount)
.SetCallbackUrl(callbackUrl)
.UseAutoIncrementTrackingNumber()
.SetZibalData(new ZibalRequestAdditionalData
{
// Optional: description, mobile number, allowed cards, ...
})
.UseZibal();
});