API · pay per call with x402

Landing page API: one call, one ready-to-publish HTML page.

Send a business name and a few details. You get back a complete, responsive, single-file HTML landing page with inline CSS: hero, services, WhatsApp or email call to action, contact section, footer, SEO meta tags and schema.org data. No account and no API key: each call is paid in USDC with the x402 protocol (HTTP 402).

Price and payment

0.25 USDC per page

Fixed price per successful call. Amount 250000 in atomic units (6 decimals).

Base or Polygon

USDC on Base (eip155:8453) or Polygon (eip155:137), scheme exact. Gasless for the payer (EIP-3009), settled by the PayAI facilitator.

You pay only for a result

Invalid input returns 400 before any payment is checked. The payment is settled only after the page has been generated.

Endpoint

POST https://landingen24h.com/api/x402/landing (JSON body) GET https://landingen24h.com/api/x402/landing?business_name=...&services=a,b,c

Supports x402 v1 (X-PAYMENT request header, X-PAYMENT-RESPONSE receipt) and v2 (PAYMENT-SIGNATURE / PAYMENT-REQUIRED / PAYMENT-RESPONSE). Response: {"html": "<!DOCTYPE html>...", "filename": "plomeria-rapida.html"}.

Input fields

business_namestring, requiredBusiness or project name (max 80)
taglinestringHeadline for the hero (max 140)
descriptionstringOne or two sentences about the business (max 600)
servicesarray of stringsUp to 8. Write "Title: short description" to add a description. In GET, comma-separated
citystringCity or area served
whatsappstringInternational number, digits only, e.g. 5491122334455. Adds WhatsApp buttons
emailstringContact email. Adds an email button
language"es" or "en"Page language. Default es
colorhexBrand color, e.g. #0f766e. Default #2563eb
cta_textstringText of the main button (max 40)

Try it with curl

curl -i -X POST https://landingen24h.com/api/x402/landing \ -H "Content-Type: application/json" \ -d '{"business_name":"Plomeria Rapida","tagline":"Plumbing repairs, same day","services":["Leak repair: detection and fix","Water heaters"],"city":"Buenos Aires","whatsapp":"5491122334455","language":"en","color":"#0f766e"}' # -> HTTP/2 402 with the payment requirements (JSON body = x402 v1, # PAYMENT-REQUIRED header = x402 v2). Pay with any x402 client and retry.

Pay automatically from code

// Node.js, x402 v1 client (npm i x402-fetch viem) import { wrapFetchWithPayment, decodeXPaymentResponse } from "x402-fetch"; import { privateKeyToAccount } from "viem/accounts"; const account = privateKeyToAccount(process.env.PRIVATE_KEY); // wallet with USDC on Base or Polygon const fetchWithPay = wrapFetchWithPayment(fetch, account); const res = await fetchWithPay("https://landingen24h.com/api/x402/landing", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ business_name: "Plomeria Rapida", language: "en", whatsapp: "5491122334455" }) }); const { html, filename } = await res.json(); console.log(filename, decodeXPaymentResponse(res.headers.get("x-payment-response")));

Any x402-compatible client or agent wallet works. The page is generated from a fixed template, so the same input always gives the same HTML. Nothing you send is stored.

Discovery

Need a page written and published for you?

The API gives you the HTML. If you prefer a custom page with copy written for your business, hosting and one round of changes, see the done-for-you landing page service. Questions: [email protected].