Track A — Library-first
NuGet / npm / Python / PHP / Woo local mode. Merchant → gateway. This is the default product.
Your code runs on the merchant server. Credentials, IPN, and live SSL IP stay with them. One unified CreateCharge hides SSL vs bKash. Optional control plane is license + minimal logs only — not payment routing.
/v1/charges. For a real bKash/SSL sandbox redirect from the merchant portal, use Setup → Live charge or the hosted API docs.NuGet / npm / Python / PHP / Woo local mode. Merchant → gateway. This is the default product.
Cloud API + portal credential slots. See hosted docs and implementation guide if you sell cloud licensing later.
| Who | Owns |
|---|---|
| Merchant app | SSL/bKash secrets, redirects, IPN URL, order DB, live SSL IP whitelist |
| PayWay library | Unified charge + IPN helpers, failover rules, optional license phone-home |
| Your control plane | Activation + txn summaries only (fail-open) |
POST https://your-payway/v1/charges. The SDK talks to SSLCommerz / bKash directly.Default path: install SDK → scaffold with dotnet new payway-* → fill PGW credentials → whitelist shop server IP for live SSL. Hosted /v1/charges is optional Track B.
dotnet add package Sianik.PayWay.Sdk
dotnet new install Sianik.PayWay.Templates
dotnet new payway-aspnetcore -n MyShop.Pay
dotnet new payway-mvc -n MyShop.Pay.Mvc
dotnet new payway-webforms -n MyShop.Pay.WebForms
# Fill PGW creds → whitelist shop IP for live SSLSame shape everywhere — appsettings, .env, or Woo settings UI.
{
"PayWay": {
"ProjectName": "My Shop",
"PortfolioReporting": true,
"PreferredGateway": "auto",
"AllowFailover": true,
"Urls": {
"Success": "https://shop.example.com/pay/success",
"Fail": "https://shop.example.com/pay/fail",
"Cancel": "https://shop.example.com/pay/cancel",
"Ipn": "https://shop.example.com/pay/ipn/ssl",
"BkashCallback": "https://shop.example.com/pay/callback/bkash"
},
"SslCommerz": {
"Enabled": true,
"IsSandbox": true,
"StoreId": "YOUR_STORE_ID",
"StorePassword": "YOUR_STORE_PASSWORD",
"Priority": 10
},
"Bkash": {
"Enabled": true,
"IsSandbox": true,
"AppKey": "…",
"AppSecret": "…",
"Username": "…",
"Password": "…",
"Priority": 20
}
}
}Interactive simulation — select gateway preference and success / fail / cancel, then Execute.
Local SDK flow — no hosted PayWay API. Pick gateway + outcome, then Execute.
using PayWay.Sdk;
var charge = await payway.CreateChargeAsync(new ChargeRequest {
Amount = 500m,
OrderId = "ORD-DEMO-1",
PreferredGateway = "auto"
});
Response.Redirect(charge.CheckoutUrl);
// IPN (YOUR domain): await payway.HandleSslCommerzIpnAsync(form);| Stack | Package | Sample |
|---|---|---|
| Web Forms / MVC / Core | Sianik.PayWay.Sdk + Sianik.PayWay.Templates | dotnet new payway-* · packages/samples/library-first/csharp-* |
| Node | @sianik/payway/local | …/node-express/ |
| Python | sianik-payway | …/python/ |
| PHP | PayWayLocal | …/php/ |
| WooCommerce | Local mode | …/woocommerce/ |
Repo markdown: docs/15 overview · docs/16 full developer guide · portal /docs/library/guide.