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 🙏

© 2025 – Pkg Stats / Ryan Hefner

amazon-seller-fees

v1.0.5

Published

Utilities to fetch Amazon GST, referral and closing fees for sellers

Readme


Amazon Fees & Shipping Calculator (India)

Lightweight Node.js utilities to look up Amazon India GST rates, referral-fee percentages, closing-fee suggestions, and shipping fee calculations (by weight, mode & zone). Ideal for price calculators, seller tools, dashboards, or server-side integrations.

Exports:

  • getAllCategories
  • getSubcategories
  • getGstPercent
  • getClosingFee
  • getReferralRate
  • getAmazonShippingFee(new)

Table of contents

  1. Install

  2. Quick start

  3. API — functions & examples

  4. Matching behaviour & notes

  5. Errors & return shapes

  6. Testing locally & publishing to npm

  7. Contribute / TypeScript tips

  8. FAQ

  9. Changelog & License


Install

If using locally in your project:

npm install amazon-seller-fees

Quick start

const {
  getAllCategories,
  getSubcategories,
  getGstPercent,
  getClosingFee,
  getReferralRate,
  getAmazonShippingFee,
} = require("amazon-seller-fees"); // or require('./path/to/index.js')

// List categories
console.log(getAllCategories());

// Subcategories
console.log(getSubcategories("automotive"));

// GST percent
console.log(
  getGstPercent("automotive", "Automotive - Helmets & Riding Gloves")
);

// Closing fee for a price
console.log(
  getClosingFee("booksMoviesMusic", "Books", {
    price: 450,
    fulfillmentType: "selfShip",  // shipping type 
  })
);

// Referral rate with optional closing fee
console.log(
  getReferralRate("automotive", "Automotive - Tyres & Rims", 550, {
    includeClosingFee: true,
  })
);

// Shipping Fee (by mode, zone & weight)
console.log(getAmazonShippingFee("easyShip", "national", 2));

API

All functions return an object with ok: true on success or ok: false with an error message on failure.


getAllCategories()

Return list of categories:

getAllCategories();
// => { ok: true, categories: [{ category_id: 'automotive', category_name: 'Automotive, Car & Accessories' }, ...] }

getSubcategories(category)

getSubcategories("automotive");
// => { ok: true, category_id: 'automotive', subcategories: [...] }

getGstPercent(category, subcategory)

getGstPercent("automotive", "Helmets & Riding Gloves");
// => { ok: true, gst_percent: 18 }

getClosingFee(category, subcategory, options = {})

Options:

  • price (number)
  • fulfillmentType (fba | easyShip | selfShip | sellerFlex)
  • selfShipType (books | allExceptBooks)
getClosingFee(null, null, { price: 450 });
// => { ok: true, fees_for_price: { ... } }

getReferralRate(category, subcategory, sellingPrice, options = {})

Options:

  • includeClosingFee (boolean)
  • fulfillmentType (string)
  • selfShipType (string)
getReferralRate("automotive", "Automotive - Tyres & Rims", 550, {
  includeClosingFee: true,
});
// => { ok: true, referral_amount: 38.5, ... }

getAmazonShippingFee(mode, zone, weightKg)

Calculate shipping cost by fulfillment mode, zone, and weight in kg.

Modes:

  • fba
  • easyShip
  • selfShip
  • sellerFlex

Zones:

  • local
  • regional
  • national

weightKg:

  • 1.0
  • 0.51
  • 0.3

Example

getAmazonShippingFee("fba", "local", 0.3);
// => { fee: 34.5 }

getAmazonShippingFee("easyShip", "national", 6.5);
// => { fee: 321 }

getAmazonShippingFee("sellerFlex", "regional", 15.2);
// => { fee: 261 + extra }

getAmazonShippingFee("selfShip", "local", 3);
// => { fee: 0 }

Matching behaviour & notes

  • Category matching is fuzzy (id or display name).
  • Shipping slabs auto-choose correct band.
  • Weights above top slab calculate base + per-kg extra.
  • selfShip always returns fee 0 (Amazon doesn’t charge).

Errors & return shapes

  • Success: { ok: true, ...data }
  • Failure: { ok: false, error: "message" }

License

MIT © AKHILESH SONI