We are using order API(https://shopify.dev/docs/admin-api/rest/reference/orders/order) in our custom integration to get the order details.
We are having issue with the gift card flow. When the customer applies the gift card the total amount on cart get decreased but when we hit order API to fetch the amount it's giving us the final amount.
final price was $100
gift card applied for $10
new final price $90.
But when we hit your order API, the value of total_price is still $100. Which is creating an issue on our end.
If we use the discount voucher, it works as expected.
As per the API doc total_price is The sum of all line item prices, discounts, shipping, taxes, and tips in the shop currency.
Gift Cards are essentially currency, that's why the rules are different. If you look at your Analytics on your Shopify store, you'll see an order for a Gift Card doesn't count as a sale. It's when your customer SPENDS the Gift Card that it will then count as a sale. And it not taxed or considered for shipping charges.
So you will see total_price is still $100. Refer https://i.imgur.com/8v1KskA.png
Hope it clear to you.