[Bug]: Partially paid and expired invoice with late overpayment
See original GitHub issueWhat is your BTCPay version?
v1.6.10.0
How did you deploy BTCPay Server?
btcpayserver-docker
What happened?
Following use case:
- an invoice gets partially paid and expires
- after expiration the invoice is overpaid
Problem 1: UI
In the invoice details you can’t see in any way that the invoice was overpaid as the invoice status is “Expired (PaidLate)” (or I miss something?)
Shown invoice was over `0.00013790’ BTC:
- first payment was
0.00010790
BTC then the invoice expired - second payment was
0.00010100
BTC
I can’t see that this was an overpayment as I do not see the original BTC value anywhere. The amount “Due” should be negative?
Also the invoice status is “Expired” and additional status is “PaidLate” instead of “PaidOver”?
Problem 2: webhook events
The webhook events of InvoiceReceivedPayment
and InvoicePaymentSettled
do also not reflect that it is an overpayment. The field overPaid
is false
both times, expected to be true
.
{
"afterExpiration": true,
"paymentMethod": "BTC",
"payment": {
"id": "fd8f11483c1804142599cd3ba59e3d456252880f357fe9d2d65792a7851fbbbc-1",
"receivedDate": 1663672742,
"value": "0.000101",
"fee": "0.000001",
"status": "Invalid",
"destination": "my7iba8Gxo7WqcwH9H4pD6z176SBKScVsc"
},
"overPaid": false,
"deliveryId": "5xHgTQYuVVaSsFuu8UMyY6",
"webhookId": "Hy3bxuiiioYwcvjjH7g87",
"originalDeliveryId": "5xHgTQYuVVaSsFuu8UMyY6",
"isRedelivery": false,
"type": "InvoiceReceivedPayment",
"timestamp": 1663672742,
"storeId": "4bc71hXipmSvK7e9PAGsRqW61EhtpmATsjcyMu5ko3sL",
"invoiceId": "YAugfJRpSR7Sea5i1ujgoJ"
}
{
"afterExpiration": true,
"paymentMethod": "BTC",
"payment": {
"id": "5ec9b5fd504dccde8e9f04efe13a12fd000c686c9296502ba462612d1487316b-0",
"receivedDate": 1663672018,
"value": "0.0001079",
"fee": "0.0",
"status": "Settled",
"destination": "my7iba8Gxo7WqcwH9H4pD6z176SBKScVsc"
},
"overPaid": false,
"deliveryId": "RnDovMYKE9KEZBvVvZfLYd",
"webhookId": "Hy3bxuiiioYwcvjjH7g87",
"originalDeliveryId": "RnDovMYKE9KEZBvVvZfLYd",
"isRedelivery": false,
"type": "InvoicePaymentSettled",
"timestamp": 1663673249,
"storeId": "4bc71hXipmSvK7e9PAGsRqW61EhtpmATsjcyMu5ko3sL",
"invoiceId": "YAugfJRpSR7Sea5i1ujgoJ"
}
How did you encounter this bug?
partially pay invoice, let it expire and overpay the remaining amount
Relevant log output
No response
What browser do you use?
No response
Additional information
No response
Are you sure this is a bug report?
- I confirm this is a bug report
Issue Analytics
- State:
- Created a year ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Handling Overpayments where an amount is debited that is ...
Here's how to do it: Edit the invoice in Xero and change the amount to $606.98; From the Unprocessed Payment in Wise-Pay, click...
Read more >How can I get a refund on a product or service I purchased ...
First, reach out to the company that sold the product or service to you. Explain the issue. Maybe the product you received was...
Read more >Medicare Program; Reporting and Returning of ...
Response: We agree that payments that were proper at the time the payment was made do not become overpayments at a later time...
Read more >20.2.4 Overpayment Interest | Internal Revenue Service
Credit interest is allowed on the overpayment that comprised the original refund from the later of the payment received date, the delinquent return...
Read more >Understanding and Improving Overpayment Waivers for ...
An overpayment occurs when unemployment insurance (UI) benefits have been paid out to a claimant and it is later found that the claimant...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ndeet addressed in #4192
@bolatovumar we discussed in dev call right now. The conclusion was that we should make sure to show the overpaid column on the invoice summary even if the status is
paidLate
(maybe also any other status) so it is always clear there was an overpayment.