Payhip
Payhip is a platform for selling digital products, memberships, and online content directly to customers.
Key features include:
- Digital product sales
- Membership and subscription products
- Secure product delivery
- Built-in payment processing
- Product embed tools for external websites
Payhip integrates with ShopWired by providing that can be added to your ShopWired theme or website pages so customers can purchase products directly from your website.
Account creation
Account creation
Create an account on the Payhip website at Payhip.
After your account is created you can add products within your Payhip account. Each product can then generate embed code which is used to display purchase buttons or embedded product pages on your ShopWired website.
Theme installation
Theme installation
Payhip requires a JavaScript file to be added to your theme so that embedded buttons or product pages can function correctly.
An example of the script is shown below.
<script type="text/javascript" src="https://payhip.com/payhip.js"></script>
The script shown above is provided as an example only. You must copy the exact script provided in your own Payhip account.
- Navigate to Website > Themes
- Select the
code editoroption for the theme you want to edit - Open the
master.twigfile - Add the script just above the closing
</head>tag - Select Save changes
Adding Payhip buy buttons to website pages
Adding Payhip buy buttons to website pages
Payhip provides embed code for individual product purchase buttons. The code will be similar to the example shown below.
<a href="https://payhip.com/b/PRODUCTID" class="payhip-buy-button" data-theme="blue">Buy Now</a>
The code shown above is provided as an example only. You must copy the exact code provided in your own Payhip account, as the code and any product ID values will be unique to your product.
- Navigate to Website > Themes
- Select
customise your theme - Select
add a new section - Select the
custom HTMLsection type - Paste the Payhip embed button code into the Custom HTML setting
- Position the section where the button should appear on the page
Embedding Payhip product pages
Embedding Payhip product pages
Payhip can also provide embed code that displays a full product page within your website. This allows the product image, title and purchase option to be displayed directly on your ShopWired site.
The embed code will be similar to the example shown below.
<div class="payhip-embed-page" data-key="PRODUCTKEY"></div>
<script type="text/javascript" src="https://payhip.com/payhip.js"></script>
The code shown above is provided as an example only. You must copy the exact code provided in your own Payhip account, as the code and any key values will be unique to your product.
- Navigate to Website > Themes
- Select
customise your theme - Select
add a new section - Select the
custom HTMLsection type - Paste the Payhip embed page code into the Custom HTML setting
- Position the section where the embedded product should appear on the page
If you want to add the embed code to a website page, select the Tick here to enter additional custom HTML/JS/CSS setting option and paste the code there.
Recommendations
Recommendations
- Install the Payhip script once within your theme to ensure all embedded buttons function correctly
- Use dedicated landing pages when embedding full Payhip product pages
- Test Payhip embeds on a draft theme before publishing changes to your live website
- Keep a record of which pages contain Payhip embed code for easier maintenance