Unable to Retrieve discountApplicationId for Removing Discount on Pending Payment Order

I want to use the API orderEditRemoveDiscount to remove a discount from an order with payment pending, but I can’t get the discountApplicationId information of the order. I have tried using the Admin API to retrieve the discountApplication ID, but the data returned does not contain the ID. Can anyone help me with this issue? Thank you!

API Documentation for removing discount:

https://shopify.dev/docs/api/admin-graphql/2024-07/mutations/orderEditRemoveDiscount