Payment Links
Create shareable links and verify payments on-chain.
A payment link stores a recipient, token, amount and optional expiry. Payers open /pay/<id>, connect a wallet and send the exact amount. ELYVORA then verifies the transaction on-chain.
Verification rules
- Transaction exists and has a successful receipt (status 0x1).
- Transaction chain ID is 99901.
- tx.to equals the link recipient and tx.value ≥ requested amount.
- Block time is not earlier than link creation; the hash has not been used before.
- Only then does the link move to paid.
typescript
const link = await fetch(`https://<your-elyvora-host>/api/v1/payment-links`, {
method: "POST",
headers: { "Content-Type": "application/json", Authorization: `Bearer ${token}` },
body: JSON.stringify({ title: "Invoice #1042", recipient: "0x…", token: "HYPE", amount: "12.5",
expires_at: "2026-12-31T23:59:00Z", reference_id: "INV-1042" }),
}).then((r) => r.json());
// after the payer's transaction is mined:
await fetch(`https://<your-elyvora-host>/api/v1/payment-links/${link.id}/verify`, {
method: "POST", headers: { "Content-Type": "application/json" },
body: JSON.stringify({ tx_hash: "0x…" }),
});