Yes, it's possible to send discount codes from the cart page to the checkout page in Shopify. You can do this by using Shopify's discount API. It will allow you to set up a discount code on the cart page and send it to the checkout page so customers can enter the code and receive the associated discount.
Here are the steps you need to take:
Set up your desired discount code in the Shopify Admin. You can find the setting to do this under Discounts.
Make sure the discount code is enabled and the criteria for applying it is met. For example, if you want customers to have to enter it on the cart page, you will need to set the “Applies to” option to “Specific products or collections” and select “Required at checkout”.
Use the Shopify discount API to capture the code on the cart page and automatically send it to the checkout page.
Test the code to make sure it works and customers can successfully enter the code and get the discount.
For more information about how to set up discount codes in Shopify, check out the Shopify Help Center.
https://help.shopify.com/en/manual/discounts/discount-codes
Good luck!