my Order API is returning
{
“refunds”: [
{
“id”: 841191751747,
“order_id”: 4296396931139,
“created_at”: “2022-06-22T02:08:41-07:00”,
“note”: “Partial refund of RMA #35579824 funded by Instant Refunds Voucher which in turn was funded by RMA #34067426 (processed by Returnly)”,
“user_id”: null,
“processed_at”: “2022-06-22T02:08:41-07:00”,
“restock”: false,
“duties”: ,
“total_duties_set”: {
“shop_money”: {
“amount”: “0.00”,
“currency_code”: “USD”
},
“presentment_money”: {
“amount”: “0.00”,
“currency_code”: “USD”
}
},
“admin_graphql_api_id”: “gid://shopify/Refund/841191751747”,
“refund_line_items”: ,
“transactions”: [
{
“id”: 5522486132803,
“order_id”: 4296396931139,
“kind”: “refund”,
“gateway”: “authorize_net”,
“status”: “success”,
“message”: “This transaction has been approved”,
“created_at”: “2022-06-22T02:08:40-07:00”,
“test”: false,
“authorization”: “63779086171#4605#refund”,
“location_id”: null,
“user_id”: null,
“parent_id”: 5314113929283,
“processed_at”: “2022-06-22T02:08:40-07:00”,
“device_id”: null,
“error_code”: null,
“source_name”: “352363”,
“payment_details”: {
“credit_card_bin”: “555753”,
“avs_result_code”: “Y”,
“cvv_result_code”: “M”,
“credit_card_number”: “•••• •••• •••• 4605”,
“credit_card_company”: “Mastercard”
},
“receipt”: {
“action”: “refund”,
“response_code”: 1,
“response_reason_code”: “1”,
“response_reason_text”: “This transaction has been approved”,
“avs_result_code”: “P”,
“transaction_id”: “63779086171”,
“card_code”: null,
“authorization_code”: null,
“cardholder_authentication_code”: null,
“account_number”: “4605”,
“test_request”: “0”,
“full_response_code”: “I00001”,
“network_trans_id”: null
},
“amount”: “57.32”,
“currency”: “USD”,
“admin_graphql_api_id”: “gid://shopify/OrderTransaction/5522486132803”
}
],
“order_adjustments”: [
{
“id”: 198878724163,
“order_id”: 4296396931139,
“refund_id”: 841191751747,
“amount”: “-57.32”,
“tax_amount”: “0.00”,
“kind”: “refund_discrepancy”,
“reason”: “Refund discrepancy”,
“amount_set”: {
“shop_money”: {
“amount”: “-57.32”,
“currency_code”: “USD”
},
“presentment_money”: {
“amount”: “-57.32”,
“currency_code”: “USD”
}
},
“tax_amount_set”: {
“shop_money”: {
“amount”: “0.00”,
“currency_code”: “USD”
},
“presentment_money”: {
“amount”: “0.00”,
“currency_code”: “USD”
}
}
}
]
},
{
“id”: 842744234051,
“order_id”: 4296396931139,
“created_at”: “2022-07-10T17:26:18-07:00”,
“note”: "110353500-44 : Too Small – processed by Returnly for RMA #34067426 – refund value applied to ",
“user_id”: null,
“processed_at”: “2022-07-10T17:26:18-07:00”,
“restock”: false,
“duties”: ,
“total_duties_set”: {
“shop_money”: {
“amount”: “0.00”,
“currency_code”: “USD”
},
“presentment_money”: {
“amount”: “0.00”,
“currency_code”: “USD”
}
},
“admin_graphql_api_id”: “gid://shopify/Refund/842744234051”,
“refund_line_items”: [
{
“id”: 345427836995,
“quantity”: 1,
“line_item_id”: 10994648580163,
“location_id”: 61507338307,
“restock_type”: “no_restock”,
“subtotal”: 53.95,
“total_tax”: 3.37,
“subtotal_set”: {
“shop_money”: {
“amount”: “53.95”,
“currency_code”: “USD”
},
“presentment_money”: {
“amount”: “53.95”,
“currency_code”: “USD”
}
},
“total_tax_set”: {
“shop_money”: {
“amount”: “3.37”,
“currency_code”: “USD”
},
“presentment_money”: {
“amount”: “3.37”,
“currency_code”: “USD”
}
},
“line_item”: {
“id”: 10994648580163,
“variant_id”: 31219018825795,
“title”: “Wally Sox Funk”,
“quantity”: 1,
“sku”: “110353500-44”,
“variant_title”: “11/44 / Ash”,
“vendor”: “Hey Dude Shoes”,
“fulfillment_service”: “manual”,
“product_id”: 3952150347843,
“requires_shipping”: true,
“taxable”: true,
“gift_card”: false,
“tax_code”: “PC040144”,
“name”: “Wally Sox Funk - 11/44 / Ash”,
“variant_inventory_management”: null,
“properties”: ,
“product_exists”: true,
“fulfillable_quantity”: 0,
“grams”: 680,
“price”: “59.95”,
“total_discount”: “0.00”,
“fulfillment_status”: “fulfilled”,
“pre_tax_price”: “53.95”,
“price_set”: {
“shop_money”: {
“amount”: “59.95”,
“currency_code”: “USD”
},
“presentment_money”: {
“amount”: “59.95”,
“currency_code”: “USD”
}
},
“pre_tax_price_set”: {
“shop_money”: {
“amount”: “53.95”,
“currency_code”: “USD”
},
“presentment_money”: {
“amount”: “53.95”,
“currency_code”: “USD”
}
},
“total_discount_set”: {
“shop_money”: {
“amount”: “0.00”,
“currency_code”: “USD”
},
“presentment_money”: {
“amount”: “0.00”,
“currency_code”: “USD”
}
},
“discount_allocations”: [
{
“amount”: “6.00”,
“discount_application_index”: 0,
“amount_set”: {
“shop_money”: {
“amount”: “6.00”,
“currency_code”: “USD”
},
“presentment_money”: {
“amount”: “6.00”,
“currency_code”: “USD”
}
}
}
],
“duties”: ,
“admin_graphql_api_id”: “gid://shopify/LineItem/10994648580163”,
“tax_lines”: [
{
“title”: “TX STATE TAX”,
“price”: “3.37”,
“rate”: 0.0625,
“channel_liable”: false,
“price_set”: {
“shop_money”: {
“amount”: “3.37”,
“currency_code”: “USD”
},
“presentment_money”: {
“amount”: “3.37”,
“currency_code”: “USD”
}
}
}
],
“origin_location”: {
“id”: 3055704080451,
“country_code”: “US”,
“province_code”: “CA”,
“name”: “Hey Dude Shoes”,
“address1”: “110 Sutter Street”,
“address2”: “9th Floor”,
“city”: “San Francisco”,
“zip”: “94104”
},
“destination_location”: {
“id”: 3228654960707,
“country_code”: “US”,
“province_code”: “TX”,
“name”: “Andrew Pettigrew”,
“address1”: “793 vz county road 3403”,
“address2”: “”,
“city”: "Wills point ",
“zip”: “75169”
}
}
}
],
“transactions”: ,
“order_adjustments”: [
{
“id”: 199796621379,
“order_id”: 4296396931139,
“refund_id”: 842744234051,
“amount”: “57.32”,
“tax_amount”: “0.00”,
“kind”: “refund_discrepancy”,
“reason”: “Refund discrepancy”,
“amount_set”: {
“shop_money”: {
“amount”: “57.32”,
“currency_code”: “USD”
},
“presentment_money”: {
“amount”: “57.32”,
“currency_code”: “USD”
}
},
“tax_amount_set”: {
“shop_money”: {
“amount”: “0.00”,
“currency_code”: “USD”
},
“presentment_money”: {
“amount”: “0.00”,
“currency_code”: “USD”
}
}
}
]
}
]
}
Question: Do I just do sum (ns27:refunds/ns27:transactions/ns27:amount ) to get total refund amount for the order ?