Discount based on the payment method

Hi everyone! How’s it going?

I’m on the Shopify Plus plan and would like to apply an automatic 5% discount when a customer selects Pix as the payment method during checkout. For all other payment methods, the price should remain unchanged.

I’ve done quite a bit of research and it seems that I’d need to create a custom checkout app to implement this logic, but I haven’t found any clear documentation or practical examples that show how to achieve it.

Has anyone here dealt with a similar situation or could point me in the right direction?

Thanks in advance for any help!

Hi GusLeL,

Ideally, you could use the Shopify Functions API to build a foolproof version of this with server-side logic only. However, information about the customer’s selected payment method is not available in the input to the Discount Functions API.

You might be able to achieve some type workaround through a combination of the Checkout UI Extensions API and a discount, though it might not be foolproof.

Best,

Tobe

Hi, did you come right with this?