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.dotnet add package Sianik.PayWay.Sdk
# Web Forms / MVC / ASP.NET Core — same package (net462+)Same shape everywhere — appsettings, .env, or Woo settings UI.
{
"PayWay": {
"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"
},
"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 | 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.