Update shipping rate of an active checkout through the use of my custom app

How do I update the shipping rate of an active checkout through my custom app whenever the user adds a discount voucher?
I’ve used the webhook to trigger the function whenever the user adds a discount voucher but I don’t know how to update the data back on the Shopify store

Hi Zaryabdaha,

I believe you’ll need to do the following:

Hope this helps!