PayWay
Login
Track A · default product

Library-first PayWay

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.

Portal sandbox? This track does not call hosted /v1/charges. For a real bKash/SSL sandbox redirect from the merchant portal, use Setup → Live charge or the hosted API docs.
IPN merchant URLSSL IP merchant serverNo hosted /v1/charges requiredFull guide →Simulator →

Mental model

WhoOwns
Merchant appSSL/bKash secrets, redirects, IPN URL, order DB, live SSL IP whitelist
PayWay libraryUnified charge + IPN helpers, failover rules, optional license phone-home
Your control planeActivation + txn summaries only (fail-open)
Happy path. Does not call POST https://your-payway/v1/charges. The SDK talks to SSLCommerz / bKash directly.

Install

dotnet add package Sianik.PayWay.Sdk
# Web Forms / MVC / ASP.NET Core — same package (net462+)

Configuration

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
    }
  }
}

Try the flow

Interactive simulation — select gateway preference and success / fail / cancel, then Execute.

Mock only. This simulator does not use portal credentials and does not call bKash or SSLCommerz. For a real sandbox redirect, use Setup → Live charge.

Charge simulator

Local SDK flow — no hosted PayWay API. Pick gateway + outcome, then Execute.

SIMcreateCharge → checkout → IPN
Choose an outcome and press Execute to see the response shape.

Matching SDK snippet

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);

Packages & samples

StackPackageSample
Web Forms / MVC / CoreSianik.PayWay.Sdkpackages/samples/library-first/csharp-*
Node@sianik/payway/local…/node-express/
Pythonsianik-payway…/python/
PHPPayWayLocal…/php/
WooCommerceLocal mode…/woocommerce/

Repo markdown: docs/15 overview · docs/16 full developer guide · portal /docs/library/guide.