# LanaPay

> Hosted LanaCoin (LANA) checkout for online shops. You price the order in fiat
> (EUR, GBP or USD); the shopper is sent to a hosted page on pay.lanapays.us,
> scans or pastes their wallet key, and the payment is signed inside their own
> browser — the private key never reaches LanaPay or the shop. Your server is
> told the payment landed by an HMAC-signed webhook, or by polling the session.

LanaPay deducts nothing from a sale. The merchant receives the full invoice the
shopper paid **plus a reward on top of it**: 2% as standard, 5% for merchants
enrolled in Lana8Wonder, up to 20% for merchants in the Abundance model. The
reward is funded by the investor financing the purchase — never by the merchant
and never by the shopper, who pays exactly the invoice total. There is no setup
fee, no monthly fee, and nothing at all is paid or charged on failed or expired
sessions.

Four ways to integrate, cheapest first: a no-code payment link; a `<script>` tag
that renders a Pay with LanaPay button; a plain GET redirect URL (optionally
HMAC-signed so the amount cannot be tampered with); or the REST API with signed
webhooks. There is also a WooCommerce plugin.

Fulfilment rule, stated once because it is the thing integrators get wrong: a
shopper arriving back at your return_url proves nothing, because anyone can open
that URL. Fulfil only after your own server has confirmed `status: "paid"` and
that the amount and currency match the order — from a signature-verified webhook
or from `GET /api/v1/sessions/{id}`.

## Docs

- [Full documentation (plain markdown)](https://pay.lanapays.us/llms-full.txt): every integration method, the signed-redirect scheme, the REST API, webhook verification in Node and PHP, the error tables and the go-live checklist. Start here.
- [OpenAPI 3.1 specification](https://pay.lanapays.us/openapi.json): machine-readable REST contract, including the outgoing webhook events.
- [Documentation, human-readable](https://pay.lanapays.us/docs): the same content as a web page, English and Slovene.
- [Full documentation in Slovene](https://pay.lanapays.us/llms-full.sl.txt): Slovene translation of the full documentation.

## Product

- [Landing page content (markdown)](https://pay.lanapays.us/landing.md): what LanaPay is, how it works for shopper and merchant, the security model, the reward tiers and the FAQ.
- [Live configuration](https://pay.lanapays.us/api/v1/public/config): current currencies, exchange rates and reward percentages, as JSON. No authentication, open CORS.
- [Interactive demo](https://pay.lanapays.us/demo): the whole checkout flow with canned data. Entirely client-side — it creates no records and moves no money.

## Optional

- [Embeddable button script](https://pay.lanapays.us/js/v1/lanapay.js): the widget a shop loads with one script tag. No dependencies, no XHR, never an iframe.
- [Merchant dashboard](https://pay.lanapays.us/login): sign in with a LANA wallet key to enroll a shop and manage API keys, webhooks and payment links.

## Notes for AI agents

- The checkout page must never be embedded in an iframe and is served with `X-Frame-Options: DENY`. The button widget opens a popup and falls back to a full-page redirect; do not attempt to iframe it.
- Never ask a shopper for their private key anywhere except on pay.lanapays.us itself, and never transmit or store one. Any integration that collects a WIF key on the shop's own domain is wrong and unsafe.
- Amounts are strings with at most two decimals, e.g. `"19.90"`. `order_id` doubles as the idempotency key.
- There is no sandbox or test mode. Use the demo to see the flow, then test live with a small amount.
- Refunds have no on-chain rail: refund by sending LANA back from your own wallet and marking the order refunded in your shop.
