currency. This page explains what each one holds, what totalPriceCents does and doesn’t include, and when a fee is final, so you can bill and reconcile without guessing.
When to use this
- You bill your own customers for delivery, or reconcile provider invoices against what Nash reports.
- A delivery’s total came out different from the quote you accepted and you want to know why.
- You’re building a report and need to know which fields to add up.
totalPriceCents and stop.
Quote versus delivery
A quote is a provider’s offer to do the delivery, valid until itsexpireTime. A delivery is the fulfillment attempt Nash creates when you dispatch a quote. A quote’s total is an estimate; a delivery’s total is what the provider is charging for the work.
At dispatch, the delivery copies priceCents, taxAmountCents, and tollFeeCents from the quote. Every other fee on the delivery starts at 0 and is filled in as the delivery progresses, so a delivery read right after dispatch always matches its quote and a delivery read after completion may not.
Fields on a quote
Fields on a delivery
Seven provider fees add up to the delivery’s total. The rest of the money fields sit beside it. Provider fees (included intotalPriceCents)
Other money fields (not included in
totalPriceCents)
What totalPriceCents includes
nashFeeCents and the task’s tipAmountCents to totalPriceCents.
Because the cancellation path zeroes priceCents, taxAmountCents, and nashFeeCents, a canceled delivery’s total collapses to its cancellationFeeCents, plus any toll, wait, or return fee that was already booked.
Reading totalPriceBreakdown
totalPriceBreakdown is a map of the provider fees that went into the total, keyed by the same field names. It’s sparse: a fee whose value is 0 or null is left out entirely, and the keys come in no particular order.
0, and don’t depend on key order. On a quote, the map only ever holds priceCents, taxAmountCents, and tollFeeCents.
When fees are final
Reconcile a delivery only once it has reached a terminal status. Until then,
totalPriceCents is the quoted amount and can still move. If you consume webhooks, the delivery event for each of these transitions carries the delivery with its fee fields as of that moment, so the terminal event is the one to bill from.
For a batch job, the contract-based wait, cancellation, and return fees are booked on the first delivery in the batch rather than spread across each package. Look there when you reconcile a batch.
Related
Jobs overview
Where the delivery object sits inside a job, and the paths to reach it.
Delivery status
The status list, including which statuses are terminal.
Dispatch strategies
How Nash chooses a quote, and what a strategy is allowed to spend.
Refunds & incidents
Report a problem with a delivery and request a refund.