Is this possible to set up in the dns register other than the web hosting?

My domain is hosted in a domain name registry cloudflare and the domain is hosted in the shopify. We have QR code tagged with each product selling in the shopify. If a customer scan it it will go to and he/she could win a prize. Recently we’ve developed the sns application on different sub domain I want to know if we can set up redirect to go to if the url has specialCode attached. Hopefully I can set up a redirect on the name on the cloudflare so we don’t need to redirect from client side since shopify doesn’t give you access to the server side. Is this possible?