Hi,
The best is to use the cart API of HikaShop:
www.hikashop.com/support/documentation/6...fterCartProductsLoad
With the onAfterCartProductsLoad trigger, you can simply set the coupon code in the cart_coupon attribute of the $cart object given to you and HikaShop will load it automatically for you in the cart provided that the coupon code is valid.
Basically, it would do the same as the "auto load in cart if possible" setting of the coupons.
If you want something more complex, you might want to use the "additional" system instead of the coupon system.
You will have a lot more liberty.
You can use that plugin as an example:
www.hikashop.com/forum/taxes/873285-fix-tax-import.html#190511