npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

bwdk-sdk

v1.0.4

Published

A simple integration tool for Buy-with-Digikala (BWDK) express-checkout in node.js projects

Downloads

270

Readme

BuyWithDK Checkout:

Buy-with-Digikala implementation in Node.JS

⬇️ Installation

Install the package from npm and require it in your Node project:

npm install bwdk-sdk
const BuyWithDigikala = require("bwdk-sdk");
// or
import BuyWithDigikala from "bwdk-sdk";

💻 Usage

const bwdk = new BuyWithDigikala("your-api-key");

🚀 Methods

BuyWithDigikala includes only 4 methods:

1: Create New Order

There are 2 required fields for creating a new Order: 1: A unique merchant id for every order, later will be used in order verification. 2: Order body like this:

{
    merchant_order_id: 1234,
    main_amount: 20000,
    Discount_amount: 4000,
    loyalty_amount: 0,
    tax_amount: 0,
    final_amount: 16000,
    callback_url: "https://yourdomain.com",
    reservation_expired_at: 1802266032,
    preparation_time: 4,
    weight: 300,
    items: [
      {
        id: 1,
        name: "Product name",
        primary_amount: 20000,
        amount: 16000,
        count: 1,
        discount_amount: 4000,
        tax_amount: 0,
        image_link:
          "https://yourdomain.com/product_image.jpg",
        preparation_time: 2,
        weight: 200,
        has_tax: true,
        tax_percent: 10,
        options: [
          {
            type_name: "color",
            name: "قرمز",
            value: "#FF0000",
            is_color: true,
          },
          {
            type_name: "size",
            name: "سایز",
            value: "XL",
            is_color: false,
          },
        ],
      },
    ],
  }
await bwdk.createOrder(orderData, merchantID);

2: Get Order Details

await bwdk.getOrderDetails("your-order-uuid");

in the response, if order.status was 7, or order.status_display was "paid by user", it means that the customer has successfully paid and now you should verify the payment.

3: Verify Order

In order to verify the payment, you should pass both order-uuid and the merchant_unique_id you passed when creating the order.

await bwdk.verifyOrder(orderId, merchantId);

4: Refund Order (not for gateway_type: 1)

reason = "Why you refunded? eg: lack of inventory";
await bwdk.refundOrder(orderId, reason);