I have a custom shipping endpoint.
I have set up a coupon code to use for free shipping and just set the coupon as $0 discount.
In my custom shipping endpoint code, I check for the coupon and if it is there, then I set the shipping as free.
This all works BUT the coupon is not being marked as 'used' in the admin 'coupons' page.
Also, although the coupon appears on the email it doesn't show up on the invoice page nor in the transaction list on the backend. (The shipping itself is showing correctly as free)
Is there some way of fixing this or a different approach to free shipping with a coupon?