-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
What is your BTCPay version?
v2.2.1+790616d2a
How did you deploy BTCPay Server?
Docker on Lunanode
What happened?
amount parameter not overriding BOLT11 amount
Endpoint:
POST /api/v1/stores/{storeId}/lightning/{cryptoCode}/invoices/pay
(Reference: [BTCPay API Docs](https://docs.btcpayserver.org/API/Greenfield/v1/#operation/StoreLightningNodeApi_PayInvoice))
According to the documentation, the amount parameter in the request body should override the amount specified in the BOLT11 invoice.
However, in practice, the amount value passed in the request does not override the value encoded in the BOLT11 invoice — the payment still uses the amount embedded in the invoice.
Steps to Reproduce
- Create a BOLT11 invoice in Speed Wallet with 39,700 sats
- Send a
POSTrequest to the endpoint with a valid BOLT11 invoice and include a customamountfield, which is 29,700. - Observe that the payment is processed using the original BOLT11 invoice amount, not the amount supplied in the request.
Expected behavior:
The payment should use the amount value provided in the request payload, overriding the amount embedded in the BOLT11 invoice (as stated in the API documentation).
Actual behavior:
The payment always uses the original amount from the BOLT11 invoice, ignoring the amount parameter.
How did you encounter this bug?
- Create a BOLT11 invoice in Speed Wallet with 39700 sats
- Send a
POSTrequest to the endpoint with a valid BOLT11 invoice and include a customamountfield, which is 21700. - Observe that the payment is processed using the original BOLT11 invoice amount, not the amount supplied in the request.
Are you sure this is a bug report?
- I confirm this is a bug report
Metadata
Metadata
Assignees
Labels
Type
Projects
Status