Find the answer to your question
I am using GetItemTransactions to process purchases, and I see that the Transaction.AmountPaid value is equal to the value in Transaction.ShippingServiceSelected.ShippingServiceCost plus the value in Transaction.Status.TransactionPrice
However I see that in the ShippingServiceSelected container, there is also a ShippingInsuranceCost value, as in this example:
What is going on here?
Why does the AmountPaid not reflect the ShippingInsuranceCost that is in the ShippingServiceSelected container?
The ShippingServiceSelected container may contain ShippingInsuranceCost even though no Insurance was selected or paid by the buyer.
The way to determine if Insurance was paid, either by the seller requiring it or the buyer choosing it in the case where the seller has made it optional is the following:
1. Check the value returned in Transaction.ShippingDetails.InsuranceOption
- If the value is Required, then you know that the seller required Insurance on the purchase, and so the ShippingInsuranceCost would be included in the calculation of the AmountPaid.
- If the value is Optional, then
2. Check the value returned in Transaction.ShippingDetails.InsuranceWanted
- If the value is true, then it means that the buyer chose Insurance, and so the ShippingInsuranceCost would be included in the calculation of the AmountPaid.
- If the value is false, then you know for sure that the ShippingInsuranceCost would not be included in the calculation of the AmountPaid.
Basically, this means that the ShippingInsuranceCost found in the ShippingServiceSelected container was not really paid and is not included in the AmountPaid if the following is returned in the Transaction:
How well did this answer your question?
Answers others found helpful
- Correct ShippingServiceCost may not be returned for international buyers prior to Checkout
- ShippingServiceSelectedCost is returned as 0 in GetItemTransactions and GetSellerTransactions
- ShippingServiceSelected is not returned in GetOrder
- Removing shipping Insurance from a listing
- A Transaction's total price