Price-related fields

The price-related fields are explained using the following scenario.

Substituting ordered item with a different item

Let's say a customer, Alice, placed an order for 3 pcs of Apples.
And 1 pc of Apple costs £5.18 and has a discount of 20%.
So, the subtotal is £15.54, discount offered is £3.12.
And other fees are tabled below.

ComponentPrice
Subtotal15.54
Service fee1.55
Delivery fee0.49
Rider tip1.00
Total18.58
Discount3.12
Customer pays15.46

And the picker, after receiving the order, substitutes 3 pcs Apples with 3 pcs Oranges.
And each Oranges costs £3.00 (notice that discount does not apply in case of substitutions).
So, the components change to–

ComponentPrice
Subtotal after substitutions9.00
Service fee1.55
Delivery fee0.49
Rider tip1.00
Total after substitutions12.04
Discount0.00
Customer already paid15.46
Customer gets a refund of3.42

Reducing the quantity of an ordered item

Let's say a customer, Bob, placed an order of 2 pcs of Bananas.
And 1 pc of Banana costs £3.50 and has a discount of 20%.
So, the subtotal is £7.00, discount offered is £1.40.
And other fees are tabled below.

ComponentPrice
Subtotal7.00
Small order fee2.00
Service fee0.99
Delivery fee0.49
Rider tip0.00
Total10.48
Discount1.40
Customer pays9.08

And the picker, after receiving the order, removed 1 pc Banana.
Since each Banana gets 20% discount, discount offered is £0.70.
So, the components change to–

ComponentPrice
Subtotal after amendment3.50
Small order fee2.00
Service fee0.99
Delivery fee0.49
Rider tip0.00
Total after amendment6.98
Discount0.70
Customer already paid9.08
Customer gets a refund of2.80

Component and its JSON field name

ComponentJSON field
Subtotalsubtotal_price
Totaltotal_price
Subtotal after substitutions/amendmentsubtotal_after_substitutions
Total after substitutions/amendmenttotal_after_substitutions