Description
Sales teams and freelancers often want to share a payment link that pre-fills a specific amount for the recipient to complete and send, acting as a lightweight invoice-request flow. This issue adds a deep-link generator accessible from the invoice creation page and the dashboard that produces a shareable URL with query params encoding a pre-filled recipient address, asset, amount, and optional memo. Opening the link on StellarSplit auto-populates the /invoice/new form or the public pay page with those values.
Technical Context
Build components/ui/DeepLinkGenerator.tsx as a modal with fields for recipientAddress, asset, amount, and memo, generating a URL of the form /pay/new?to=[address]&asset=[code]&amount=[value]&memo=[text] using URLSearchParams. Apply Base64-URL encoding to protect memo text from special-character issues. In app/pay/new/page.tsx (new route), read these params via Next.js searchParams and pre-populate a simplified invoice creation form using defaultValues in react-hook-form. Validate each param server-side in the page's Server Component before passing to the client form (reject invalid G-addresses, non-positive amounts, unsupported asset codes). The generator modal includes a copy-to-clipboard button and a QR code of the generated URL rendered by the existing InvoiceQR infrastructure.
Acceptance Criteria
Description
Sales teams and freelancers often want to share a payment link that pre-fills a specific amount for the recipient to complete and send, acting as a lightweight invoice-request flow. This issue adds a deep-link generator accessible from the invoice creation page and the dashboard that produces a shareable URL with query params encoding a pre-filled recipient address, asset, amount, and optional memo. Opening the link on StellarSplit auto-populates the
/invoice/newform or the public pay page with those values.Technical Context
Build
components/ui/DeepLinkGenerator.tsxas a modal with fields forrecipientAddress,asset,amount, andmemo, generating a URL of the form/pay/new?to=[address]&asset=[code]&amount=[value]&memo=[text]usingURLSearchParams. Apply Base64-URL encoding to protect memo text from special-character issues. Inapp/pay/new/page.tsx(new route), read these params via Next.jssearchParamsand pre-populate a simplified invoice creation form usingdefaultValuesinreact-hook-form. Validate each param server-side in the page's Server Component before passing to the client form (reject invalid G-addresses, non-positive amounts, unsupported asset codes). The generator modal includes a copy-to-clipboard button and a QR code of the generated URL rendered by the existingInvoiceQRinfrastructure.Acceptance Criteria