Skip to content

Delhivery rates ​

calculateRate(params) calls Delhivery's charge-estimate endpoint (/api/kinko/v1/invoice/charges/.json) and maps the response to a normalized amount summary.

Parameters ​

FieldTypeRequiredNotes
md"E" | "S"yesExpress or surface mode
cgmnumberyesChargeable weight in grams
ss"Delivered" | "RTO" | "DTO"yesShipment stage for the estimate
o_pinnumber | stringnoOrigin pincode
d_pinnumber | stringnoDestination pincode
pt"Pre-paid" | "COD"noPayment type
ts
const rate = await sdk.calculateRate({
  md: "S",
  cgm: 500,
  ss: "Delivered",
  o_pin: "400001",
  d_pin: "110001",
  pt: "Pre-paid",
});

console.log(rate.totalAmount, rate.grossAmount, rate.taxAmount);

Response ​

FieldTypeNotes
totalAmountnumber | nullFinal charge estimate
grossAmountnumber | nullAmount before tax
taxAmountnumber | nullTax component
currency"INR"Fixed
rawunknownOriginal Delhivery payload

The SDK reads top-level total_amount, gross_amount, and tax_amount fields when present and keeps the full response in raw. Delhivery can return an array of charge estimates; inspect raw if you need every estimate or tax_data.

Use serviceability first to confirm that the destination pincode is served before quoting a rate.