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
- Create a reusable payment link (dashboard → Payment links → New → Type: Reusable), or a single-use one for a specific invoice.
- 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
| Attribute | Required | Default | Notes |
|---|---|---|---|
data-lango-link | yes | — | The link’s token (plk_...), from dashboard or API |
data-lango-label | no | Pay with EcoCash | The button text |
data-lango-amount | no | — | Display 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-amountis 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).