Add Payhip to Wix

Got a Wix website? This article will take you through linking to your Payhip store from Wix.
In this article:

Add a link to Wix

If you want to add a link to your Wix site directly to a product, to start with you would need to find the right URL. To do that, you'll want to click on Products at the top of your admin dashboard, find the product you would like to promote, and select Share / Embed.

Screenshot showing the Share / Embed button on the products page in Payhip

This will take you to a modal showing your product URL, which you can copy and paste into your Wix site wherever you might need it.

An example of the link tab of the Share / Embed modal for a product in Payhip

You can also use your store URL to link directly to your store home page from Wix. To find this URL, navigate to Account > Settings and scroll down to Username.

Embed a button on Wix

If you want to add a button to your Wix site, the process is a little tricky. This is because they create an iFrame (i.e. they put everything into a box). It makes adding to cart purchases not possible, but you can still do direct purchases with the following workaround.

To start with, click on Products at the top of your admin dashboard, find the product you would like to promote, and select “Share / Embed.

Screenshot showing the Share / Embed button on the products page in Payhip

After this, go to the Embed Button tab of the modal that appears. This will allow you to preview and customize your button (its text, colour and type). There are two types of buttons that you can create - be sure to select Direct Purchase as Add to Cart buttons won't work with Wix.

An example of the embed button tab of the Share / Embed modal for a product in Payhip

Once you are done with creating your button, click Get Your Embed Code. This will give you two snippets of code.  The first snippet is Javascript and the second is HTML.

The embed code for a button

Next, you'll want to log into your Wix website and go to your Editor.

The Wix editor

Once there, you can go to the taskbar running down the left-hand side of the screen and click Add.

The Add button in the Wix editor

Select Embed from the list, followed by Embed a Widget.

Click on the box that appears and press Enter Code, which will allow you to input both snippets of code. You can paste the Javascript code as is. For the HTML code you'll want to add the attribute data-method=”fallback_window" after the Payhip URL and before the class, as shown below.

Adding in the Payhip code snippets on Wix

Then click  Update to publish the code and view your site. You should now see your button embedded there.

Feel free to test out the button. If it's working you'll see a modal pop up with the checkout page for your product.

Screenshot of the Payhip checkout modal linked to from Wix

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.