Skip to content

feat(stellar): add payment link generation and consumption#34

Open
legend4tech wants to merge 2 commits into
wraith-protocol:developfrom
legend4tech:feature/stellar-payment-link
Open

feat(stellar): add payment link generation and consumption#34
legend4tech wants to merge 2 commits into
wraith-protocol:developfrom
legend4tech:feature/stellar-payment-link

Conversation

@legend4tech
Copy link
Copy Markdown

@legend4tech legend4tech commented May 29, 2026

Title

feat(stellar): add payment link generation and consumption

Description

This PR introduces the ability to generate and consume payment links on the Stellar network, solving the UX friction of sharing raw meta-addresses manually. Senders can now share a URL (or QR code) that deep-links directly into a pre-filled Send page.

Features

  • Generate Payment Link: Added a new UI section to StellarReceive (visible after deriving keys) that allows recipients to generate a payment URL and QR code.
  • Form Options: Senders can optionally pre-fill an amount, a memo, and an expires-at duration (defaults to 24h).
  • Consumption Route (/pay): Added a /pay route that loads the Send page and populates the inputs based on the URL parameters.
  • Validation & Tamper Resistance:
    • The Send form validates the exp timestamp. If the link is expired, it displays an error and disables the submit button.
    • Pre-filled inputs (recipient, amount, memo) are disabled on the Send page to ensure the sender sends exactly what was requested without accidental modification.
  • Memo Support: Added native support for the memo field in StellarSend to append to the TransactionBuilder.
  • E2E Testing: Includes a Playwright test suite (e2e/payment-link.spec.ts) validating the pre-fill behavior and expiration logic.

Design Decisions & Trade-offs

  • URL Parameter Signing: Decided to skip signing URL parameters with the recipient's spending key for this iteration. Rationale: Keeps URLs short and simple. Since the sender always reviews the final transaction details in their wallet before signing, any tampering with the URL only alters the pre-filled form data, not the final authorized transaction.
  • .wraith Name Lookup: Defaulted to using the raw meta-address for now, as on-chain .wraith name resolution context is not yet fully available for the Stellar chain in this codebase.

Screenshot

Screenshot from 2026-05-29 05-14-45

Testing

  • Tested generating a link with combinations of amount, memo, and expiration.
  • Verified QR code rendering.
  • Verified /pay deep-link correctly pre-fills and locks down form inputs.
  • Verified expired links are properly rejected.

closes #7

@vercel
Copy link
Copy Markdown

vercel Bot commented May 29, 2026

@legend4tech is attempting to deploy a commit to the truthixify's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 29, 2026

@legend4tech Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@truthixify truthixify changed the base branch from main to develop June 1, 2026 15:43
@truthixify
Copy link
Copy Markdown
Contributor

Payment link generation, the /pay route consumer, QR code, and Playwright e2e are exactly what issue #7 asked for. Conflicting after recent merges in StellarSend / StellarReceive.

Rebase:

git fetch origin
git rebase origin/develop
git push --force-with-lease

Keep your new e2e spec, playwright.config.ts, payment-link UI; layer your link generation form into develop's current StellarReceive (don't wipe the sponsored-withdrawal flow). Thanks @legend4tech.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stellar payment-link / invoice flow

2 participants