Skip to content

Dynamic Public Invoice Status Page #415

Description

@Kingsman-99

Description

Payers who receive an invoice link need a public, unauthenticated page showing the current payment status, amounts due, and a pay button without requiring them to create a StellarSplit account. This issue introduces a public invoice status page at /pay/[invoiceId] that is server-rendered for fast load times, shows real-time payment progress via client-side polling of confirmed on-chain transactions, and presents the pay action using Freighter or a compatible Stellar wallet. The page respects the creator's branding settings (logo, accent color).

Technical Context

Create app/pay/[invoiceId]/page.tsx as a Next.js Server Component that fetches public invoice data (no auth required) from app/api/public/invoices/[id]/route.ts. The public API endpoint exposes only non-sensitive fields: title, totalAmount, asset, recipients, status, dueDate, branding. Client-side hydration in components/pay/PublicInvoiceView.tsx polls app/api/public/invoices/[id]/status/route.ts every 10 seconds to refresh payment progress. The pay button calls Freighter's getPublicKey (to auto-detect the payer's address) then builds and signs a payment transaction. Apply creator branding using inlineStyle variables derived from the branding settings. Generate og:image meta tags using next/og for social sharing.

Acceptance Criteria

  • The public page loads without authentication and displays correct invoice title, amount, asset, due date, and current payment status
  • Payment progress (e.g., 60% funded) updates within 10 seconds of a partial payment being confirmed on-chain
  • The pay button correctly builds a Stellar payment transaction for the remaining unpaid amount and surfaces it to Freighter for signing
  • Creator branding (logo, accent color) is visible on the public page when set, and the page falls back to platform defaults when branding is not configured
  • og:image and og:title meta tags are populated with invoice-specific data for social-link previews
  • All CI checks (npm test, npm run build, ESLint/TypeScript) pass and the branch has no merge conflicts

Activity

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

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programcomplexity: highuiUI styling and visual changes

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions