Repetitive IPNs
See original GitHub issueWith fullNotifications
set to True
, BTCPay server correctly sends multiple IPNs for different invoice statuses. However, on fast confirming payments (namely lightning and also payments where the user has set BTCPay to consider zero confirmations as confirmed) BTCPay sends multiple duplicate IPNs instead separate IPNs.
Example:
With fullNotifications
set to True
, with an on-chain payment, BTCPay will send an IPN on ‘paid’, and another IPN on ‘confirmed’, and another one on ‘complete’. All is good.
With fullNotifications
set to True
, with a lightning payment, the BTCPay logs will show an IPN will sent an IPN on ‘paid,’ and another on ‘confirmed’, and another on ‘complete’, as would be expected. But in reality, the receiver instead gets 3 IPNs that all say ‘confirmed’ instead of getting 1 ‘paid’, 1 ‘confirmed’, and 1 ‘complete.’
I just pushed an update to LibrePatron that works around this issue by ignoring the duplicate IPNs (submitted a PR for the new Docker fragment so my users can get a fix, please merge into btcpayserver-docker!), but this would create problems in other scenarios.
It seems like a short delay between status updates would be the fix. Send a ‘paid’ IPN, give a short delay for the recipient to receive the IPN, then recipeint pings BTCPay for ‘paid’ status. Then change the status to ‘confirmed’, again another short delay so that the recipient can receive and ping for status, then finally send ‘complete’.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (7 by maintainers)
Top GitHub Comments
Cool will release new version later today. (Still some other fixes in the pipes)
@NicolasDorier Just tested it out. It’s all good now; it now works as expected.