amazon-seller-fees
v1.0.5
Published
Utilities to fetch Amazon GST, referral and closing fees for sellers
Maintainers
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:
getAllCategoriesgetSubcategoriesgetGstPercentgetClosingFeegetReferralRategetAmazonShippingFee✅ (new)
Table of contents
Install
If using locally in your project:
npm install amazon-seller-feesQuick 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:
fbaeasyShipselfShipsellerFlex
Zones:
localregionalnational
weightKg:
1.00.510.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.
selfShipalways returns fee0(Amazon doesn’t charge).
Errors & return shapes
- Success:
{ ok: true, ...data } - Failure:
{ ok: false, error: "message" }
License
MIT © AKHILESH SONI
