Hi @martabel
Keep in mind with the checkout API your app will need to be a sales channel and have proper payment processing permissions. You may be interested in the order edit API to add a new line_item when that is fully released. More information here: https://help.shopify.com/en/api/guides/editing-orders
When you say the refund is not going to the correct endpoint, can you elaborate? When you refund a manual order there will not be any transactional changes as the order was created manually and set to “paid” status without a transaction. It will, however, update the status.