Skip to content

[Fix] Onchain polling expired payments - #249

Open
talvasconcelos wants to merge 5 commits into
mainfrom
fix/onchein_polling
Open

[Fix] Onchain polling expired payments#249
talvasconcelos wants to merge 5 commits into
mainfrom
fix/onchein_polling

Conversation

@talvasconcelos

Copy link
Copy Markdown
Collaborator

Mark expired payments and stop polling.
Closes #244

Introduce TposPaymentStatus enum and a status column on tpos.payments,
with a migration backfilling paid rows as 'paid'. Terminal statuses
(expired/underpaid/abandoned) are defined so polling can stop instead of
relying on paid = false.
Only poll payments whose status is still 'pending', and transition
expired/failed invoices with zero or partial balance into terminal
states (expired/underpaid/abandoned). A paid standalone invoice is now
handled directly instead of re-settling. Improve the polling warning to
include payment identity and exception type.
Return the payment status for expired/underpaid/abandoned onchain
payments so the client can stop polling and prompt manual
reconciliation, while preserving the existing paid response shape.
Close the invoice dialog and notify the merchant when an onchain
payment reaches a terminal state, with a specific message for
underpaid invoices that require manual reconciliation.
Add parametrized coverage for expired, underpaid, abandoned and
still-pending onchain payments, asserting the terminal states stop
polling while pending/zero-conf cases keep polling.
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.

[Bug] Unpaid onchain payments are polled forever

1 participant