Skip to Content
FastracDocs
Shipping rates

Insurance and COD

Add insurance to a rate, or collect cash on delivery from the receiver.

Product
APIShipping Engine API
Section
Shipping rates
Reading time
2 min read

In short

  • Set insurance: true to insure the parcel at its itemValue. Regular couriers require you to choose true or false.
  • Set codOption.isCod: true to have the courier collect cash from the receiver. Your key needs the USE_COD permission.
  • Both are priced into the rate and appear in priceDetail.

Insurance

Insurance covers loss or damage up to the declared itemValue, under the courier's terms.

{ "insurance": true, "packages": [{ "itemValue": 500000, "...": "..." }] }
Field in insuranceBreakdownMeaning
insurancePercentPremium as a percentage of itemValue
insuranceMinimumLowest premium charged
insuranceAdminFeeFixed fee added on top
insuranceTotal charged: max(percent × itemValue, minimum) + adminFee

PPN of 11% is added on the insurance amount as ppnInsurance. If a service can't insure parcels, the request returns Selected courier service does not support insurance premium calculation.

Cash on delivery (COD)

With COD, the courier collects money from the receiver at the door and Shipping Engine pays it out to you after delivery.

{ "codOption": { "isCod": true }, "insurance": false, "...": "..." }

Before you start

  • Your API key must have the USE_COD permission, otherwise the request returns 403 You are not allowed to use COD for shipping rate COD.
  • Only services with isSupportCod: true can be used. With REGULAR or ALL, other services are still returned, without COD.
  • An order can't mix COD and non-COD shipments.

Standard COD

The receiver pays for the goods plus all shipping costs:

codBilled       = totalPrice + itemValue + codFee + ppnCod
codDisbursement = itemValue            ← paid out to you

Custom COD amount

Set codCustomAmount to collect a specific amount, for example a rounded price. Shipping Engine takes its costs out of it, and you receive the rest:

codBilled       = codCustomAmount
codDisbursement = codCustomAmount − (totalPrice + codFee + ppnCod)

The custom amount must at least cover totalPrice + codFee + ppnCod. Otherwise the request fails with the lowest amount allowed, for example Custom COD amount cannot be less than totalPrice + COD fee + PPN COD (Rp 14820).

Field in codBreakdownMeaning
codBilledAmount the courier collects from the receiver
codDisbursementAmount you receive after delivery
codFee, codFeePercentShipping Engine's COD fee and its percentage (a minimum applies)
codCustomThe custom amount you sent, or 0

Some couriers cap the COD amount. SPX, for example, accepts up to Rp 5.000.000. Above the cap you get COD amount (Rp …) exceeds the maximum COD of Rp … for courier SPX.

Use the calculator on the pricing page to try different amounts.

Was this page helpful?

On this page