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 /

Payment button embed

Payment button embed

We try to make getting setup with Payhere as easy as possible, that's why you can easily copy and paste two lines of code and have an integrated payment modal operating on your site. Our base install is as easy as copy pasting a snippet from your plan in the merchant admin.

Embed code

This code is very straightforward:

<button data-payhere-embed="https://app.payhere.co/altlabs/coffee">Payhere</button>
<script src="https://payhere.co/embed/embed.js"></script>

Additional parameters available

  • data-payhere-embed="url-to-payment-form" Required - this is the only required param and must link directly to your payment form.
  • data-payhere-customer-name="customer-name" Optional - allows you to prefill customers name
  • data-payhere-customer-email="customer@email.com" Optional - allows you to prefill customers email address
  • data-payhere-disable-customer="yes" Optional - disables the customer fields so they cannot edit their details, this is useful if you want to ensure the customers email address on your system matches up with Payhere

A complete example:

<button
  data-payhere-embed="https://app.payhere.co/altlabs/coffee"
  data-payhere-customer-name="Pete Hawkins"
  data-payhere-customer-email="pete@example.org"
  data-payhere-disable-customer="yes"
>
  Buy me a coffee
</button>
<script src="https://payhere.co/embed/embed.js"></script>

Multiple plans per page

One other thing to bear in mind, you can have multiple plans on your page, for this you'll only need to include the embed code once.

<button data-payhere-embed="https://app.payhere.co/altlabs/coffee">Buy me an americano</button>
<button data-payhere-embed="https://app.payhere.co/altlabs/coffee-flat-white">Buy me a flat white</button>
<button data-payhere-embed="https://app.payhere.co/altlabs/coffee-late">Buy me a latte</button>
<script src="https://payhere.co/embed/embed.js"></script>
← Simple linkReact SDK →
  • Payment button embed
    • Additional parameters available
    • Multiple plans per page
Developers
Docs
Getting StartedEmbed SDKAPI Reference
Payhere
HelpSignup freeFeatures
More
Our BlogGitHubTwitter
Copyright © 2025 Payhere Payments Ltd