Developers

Developers

  • Docs
  • Help
  • Blog

›Integrations

Overview

  • Getting Started
  • Testing

Integrations

  • Simple link
  • Simple embed
  • React SDK
  • Embed SDK
  • Webhooks
  • REST Hooks
  • Wix Embed SDK

API

  • Authentication

/api

    /v1/current_company

    • GET /
    • PUT /
    • GET /stats

    /v1/customers

    • GET /
    • GET /:id

    /v1/payments

    • GET /
    • GET /:id

    /v1/plans

    • GET /
    • POST /
    • PUT /:id

    /v1/refunds

    • POST /

    /v1/subscriptions

    • GET /
    • GET /:id
    • DELETE /:id

    /v1/user

    • GET /

Wix Embed SDK

Installation

First, set up your payment links in Wix to like to Payhere, you can see how to do that using the following guide.

Once you have your buttons connected, you’ll want to add a Custom Code marketing element.

Add wix custom code element

  1. First you’ll want to select the 'Add element' button on the right hand menu in the Wix editor
  2. Then choose 'Embed code', and 'Marketing tools', and finally click the 'Custom Code' element.
  3. Next you’ll see a screen showing some areas of the page you can add custom code to. Inside the 'Head` section, click the 'Add code' button

Add wix custom code

  1. Paste the code snippet below into the first box.
  2. Give your embed code a name, this can be anything you want, but I’ve used 'Payhere auto embed' in this example.
  3. Click 'Apply'
  4. Publish the changes to your website

Now any Payhere links that you setup using the previous guide will open embedded within your website 🎉

<script src="https://app.payhere.co/embed/embed.js"></script>
<script>
  document.addEventListener("DOMContentLoaded", function() {
    document.querySelectorAll("a").forEach(function (link) {
      const text = link.innerText.trim()
      if (link.href.startsWith("https://sandbox.payhere.co") || link.href.startsWith("https://app.payhere.co")) {
        console.log("link", link.href)
        link.addEventListener("click", function(event) {
          event.preventDefault()

          PayHere.launch({
            embedURL: link.href
          })
        })
      }
    })
  });
</script>

Wix subscription payment example

← REST HooksAuthentication →
  • Installation
Developers
Docs
Getting StartedEmbed SDKAPI Reference
Payhere
HelpSignup freeFeatures
More
Our BlogGitHubTwitter
Copyright © 2025 Payhere Payments Ltd