Skip to content

The buy button

The buy button puts a Lango payment button on any page — a WordPress site, a school’s ancient CMS, a Google Sites page. There is no key in the page and nothing to steal: the button rides on a payment link, and a link token only lets a customer pay you.

Setup

  1. Create a reusable payment link (dashboard → Payment links → New → Type: Reusable), or a single-use one for a specific invoice.
  2. Paste this where the button should appear:
<script async src="https://checkout.lango.co.zw/buy-button.js"></script>
<div
data-lango-link="plk_01J8XQ..."
data-lango-label="Pay with EcoCash"
data-lango-amount="USD 10.00"
></div>

That’s the entire integration. Clicking opens Lango’s hosted checkout for that link; the customer approves on their phone; the payment lands in your dashboard and webhooks with the link’s reference.

Attributes

AttributeRequiredDefaultNotes
data-lango-linkyesThe link’s token (plk_...), from dashboard or API
data-lango-labelnoPay with EcoCashThe button text
data-lango-amountnoDisplay only, e.g. USD 10.00 — shown after the label

Multiple buttons on one page work; the script renders every [data-lango-link] it finds.

Notes

  • The script is ~2KB, dependency-free, and never touches your page beyond the divs you mark. It makes no network requests of its own.
  • The amount charged is always the link’s amount — data-lango-amount is a label, so a tampered attribute can mislabel but never mischarge.
  • Want the price to come from your page dynamically? That’s the inline modal, which arrives after launch — for now create one link per price (bulk API makes that painless).