What cancelling costs depends on how far the order has come. Always check first, or cap the fee.
Check the fee
Section titled “Check the fee”curl https://driver-staging-api.delivr.no/v1/merchant/orders/$ORDER/cancellation \ -H "Authorization: Bearer $DELIVR_API_KEY"{ "cancellable": true, "stage": "driver_en_route", "fee": { "amountMinor": 7900, "vatMinor": 1580, "exVatMinor": 6320, "currency": "NOK" }}| Stage | On demand | Window |
|---|---|---|
free |
No driver has accepted yet, or a driver is handing the job back. | Before cutoffAt. |
driver_en_route |
A driver accepted and is on the way. Your agreement’s en-route fee. | |
driver_arrived |
The driver is at the store. Your agreement’s arrival fee. | |
not_cancellable |
Picked up, or ended. | After cutoffAt. |
On demand there is no grace period: the fee applies from the moment a driver accepts.
Cancel
Section titled “Cancel”curl -X POST https://driver-staging-api.delivr.no/v1/merchant/orders/$ORDER/cancel \ -H "Authorization: Bearer $DELIVR_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "reasonCode": "changed_mind", "maxFeeMinor": 0 }'The answer has the cancelled order and the fee it settled with.
maxFeeMinorcaps the fee you accept. Send0to cancel only while it is free. If the fee is higher you get409 fee_changedwith the current fee indetails, and nothing is cancelled. WithoutmaxFeeMinoryou accept any fee.reasonCode: on demandtoo_slow,changed_mind,price,found_other,wrong_detailsorother; for windowsplans_changed(default),found_other,wrong_detailsorother.otherneeds areasonText.- A window order after its cutoff answers
409 cancellation_not_allowed. - Cancelling again answers the same result, so retries are safe.
Fees appear on your weekly invoice.