Add Payhip to Shopify
Got a Shopify store that you’d like to integrate with your Payhip store? No problem! This article outlines some different ways that you can do just that.
Embed a Payhip button on Shopify
You are able to embed a Payhip button on your Shopify store. This will enable customers to buy your Payhip products without leaving the page.
The Payhip-generated buttons are only available for digital and physical products right now. To link another kind of product to Shopify, see the next section.
Step 1. Get the embed code
Head to Products in your admin dashboard and click Share / Embed for your product.
Go to the Embed Button tab of the window that appears.
From here, you can customize the button’s text, color, and type. There are two types of button that you can create:
- Direct Purchase – Will direct the user straight to checkout for the product.
- Add to Cart – Will add the product to the user’s cart. They’ll be able to add other products before purchasing.
Once you’re done creating your button, click Get Your Embed Code. This will give you two snippets of code (JavaScript and HTML) that you need to add to your Shopify store.
Step 2. Add the JavaScript to your Shopify theme
Copy the JavaScript snippet and then head on over to your Shopify dashboard.
Under Sales channels, click Online Store, and make sure you’re on the Themes tab.
Click the three-dot icon for your current theme and choose Edit code.
This will load up your Shopify theme. It might look a little intimidating, but don’t worry! We’ll walk you through what to do…
Over on the left-hand side, go to theme.liquid.
Find the closing </head> tag. (A quick way to do this is to hit Control / Command + F and search for </head>)
Paste the JavaScript snippet you got from Payhip just before the closing </head> tag and click Save.
Step 3. Add the button to your page
Click the Exit button at the top left of the screen to go back to your Themes page. Then click Customize to open up your store editor, and navigate to the page that you want to add the button to.
Click Add section and choose the Custom Liquid option.
Paste the second snippet of code from Payhip into the Custom Liquid field.
Save your changes, and you’ll see your button appear in the preview pane on the right.
You can use HTML around the embed code; e.g. to center the button put <center> tags around it.
Add a link to Shopify
If you don’t mind directing people away from Shopify and over to Payhip to purchase, then the easiest way to integrate your Payhip store with Shopify is to link to your product sales page or checkout on Payhip.
Link to the product sales page
To find the URL for your product sales page, just click Products at the top of your admin dashboard, then find the product you’d like to promote and click Share / Embed.
Link directly to checkout
If you want to skip the Payhip product sales page, then you can send people directly to checkout.
For digital and physical products, here’s how to get the direct checkout link: Direct Checkout Link
For courses, memberships, coaching, and bundles head to the Pricing tab and click Copy URL for your chosen pricing plan.
Embed a page on Shopify
For digital and physical products, you can also embed your full product sales page on Shopify if you’d like to.
To do that, find the product you want to promote, click Share / Embed, and go to the Embed Page tab.
Copy the code from the Embed code field and head on over to Shopify and the page to which you want to add the embed to.
Click Add Section and choose the Custom Liquid option.
Paste your embed code into the Custom Liquid field. Once you’ve saved your changes, you’ll see your page embedded.