Skip to content

[Contract] Implement InvoiceContract on Soroban for on-chain invoice state #39

@JayWebtech

Description

@JayWebtech

Overview

Invoices are a roadmap feature. The backend has an InvoiceService but there is no corresponding on-chain contract to track invoice state, prevent double-payment, or provide a verifiable invoice proof.

Technical Requirements

  • Create fluxapay/src/invoice.rs Soroban contract.
  • Store: invoice_id, merchant_id, amount, currency, due_date, status (Draft/Issued/Paid/Cancelled), payment_id (Option).
  • Expose: create_invoice, issue_invoice, mark_paid(payment_id), cancel_invoice, get_invoice.
  • Link to PaymentProcessor: mark as Paid when the linked payment is confirmed.
  • Emit INVOICE/ISSUED, INVOICE/PAID, INVOICE/CANCELLED events.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions