Skip to content

feat: consumer-facing invoice checkout page (#71)#128

Merged
0xdevcollins merged 3 commits intomainfrom
feat/invoice-checkout-consumer-page
Apr 5, 2026
Merged

feat: consumer-facing invoice checkout page (#71)#128
0xdevcollins merged 3 commits intomainfrom
feat/invoice-checkout-consumer-page

Conversation

@0xdevcollins
Copy link
Copy Markdown
Owner

Summary

  • Adds public GET /v1/invoices/:id/checkout endpoint returning merchant branding, line items, and invoice totals
  • Adds public POST /v1/invoices/:id/pay that creates a 1:1 fiat quote + payment session and returns paymentId
  • Patches getCheckoutPayment to expose paymentMethods from payment metadata so existing PaymentMethodSelector renders correctly
  • Adds useInvoiceCheckout and useInitiateInvoicePayment hooks in the checkout app
  • Builds full InvoiceCheckoutClient component handling all invoice states:
    • Loading — skeleton UI
    • Draft — not yet sent notice
    • Paid — confirmation with paid date
    • Cancelled — cancelled notice
    • Overdue — red warning + Pay button still available
    • Payable (SENT / VIEWED / PARTIALLY_PAID) — line items table, totals, Pay Now button with merchant brand color
  • Adds /invoice/[invoiceId] route in apps/checkout

Test plan

  • Open a SENT invoice checkout URL — verify merchant branding, line items, and Pay Now button render correctly
  • Click Pay Now — verify redirect to /[paymentId] checkout flow
  • Open a PAID invoice — verify paid confirmation state shown, Pay Now hidden
  • Open a CANCELLED invoice — verify cancelled state shown
  • Open a DRAFT invoice — verify "not yet available" message shown
  • Open an OVERDUE invoice — verify red warning and Pay button still visible
  • Open a PARTIALLY_PAID invoice — verify balance due shown and Pay button available
  • Verify brand color applied to Pay Now button when merchant has brandColor set
  • Verify mobile layout renders without iframe issues

Closes #71

🤖 Generated with Claude Code

0xdevcollins and others added 3 commits April 4, 2026 22:34
- Add public GET /v1/invoices/:id/checkout endpoint returning display data
- Add public POST /v1/invoices/:id/pay endpoint creating 1:1 fiat quote + payment
- Patch getCheckoutPayment to expose paymentMethods from payment metadata
- Add useInvoiceCheckout and useInitiateInvoicePayment hooks in checkout app
- Build InvoiceCheckoutClient with all invoice status states (draft, paid,
  cancelled, overdue, payable) and merchant branding support
- Add /invoice/[invoiceId] route in checkout app

Closes #71

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@0xdevcollins 0xdevcollins merged commit 7c0363d into main Apr 5, 2026
1 of 4 checks passed
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.

Checkout: Invoice Payment Landing Page

1 participant