What changed, and why it matters
This commit adds a new 'deliveryTime' field to BTCPay Server's webhook API responses and updates the related documentation and invoice UI wording. It exposes when a webhook was actually sent, separate from when it was scheduled. There is no indication this change fixes or introduces a security vulnerability; it appears to be a transparency/usability improvement.
No security action required. Review as a normal feature/API change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change extends WebhookDeliveryData with a DeliveryTime DateTimeOffset, maps it in GreenfieldStoreWebhooksController, updates the invoice view to remove a hidden ‘.creation-time’ CSS rule and clarifies the delay explanation, and updates the Swagger schema to document both timestamp (scheduled) and deliveryTime (actual broadcast). No input handling, authorization, cryptographic, or execution-path changes are present.
Changed components
BTCPayServer.Client/Models/WebhookDeliveryData.csBTCPayServer/Plugins/Webhooks/Controllers/GreenfieldStoreWebhooksController.csBTCPayServer/Views/UIInvoice/Invoice.cshtmlBTCPayServer/wwwroot/swagger/v1/swagger.template.webhooks.jsonInspect captured patch +15 / −6
diff --git a/BTCPayServer.Client/Models/WebhookDeliveryData.cs b/BTCPayServer.Client/Models/WebhookDeliveryData.cs
index 0c36262..c995f27 100644
--- a/BTCPayServer.Client/Models/WebhookDeliveryData.cs
+++ b/BTCPayServer.Client/Models/WebhookDeliveryData.cs
@@ -10,6 +10,8 @@ namespace BTCPayServer.Client.Models
public string Id { get; set; }
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
public DateTimeOffset Timestamp { get; set; }
+ [JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
+ public DateTimeOffset DeliveryTime { get; set; }
public int? HttpCode { get; set; }
public string ErrorMessage { get; set; }
[JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
diff --git a/BTCPayServer/Plugins/Webhooks/Controllers/GreenfieldStoreWebhooksController.cs b/BTCPayServer/Plugins/Webhooks/Controllers/GreenfieldStoreWebhooksController.cs
index 1d0d651..f6c73f7 100644
--- a/BTCPayServer/Plugins/Webhooks/Controllers/GreenfieldStoreWebhooksController.cs
+++ b/BTCPayServer/Plugins/Webhooks/Controllers/GreenfieldStoreWebhooksController.cs
@@ -174,6 +174,7 @@ namespace BTCPayServer.Plugins.Webhooks.Controllers
{
Id = data.Id,
Timestamp = data.Timestamp,
+ DeliveryTime = data.DeliveryTime,
Status = b.Status,
ErrorMessage = b.ErrorMessage,
HttpCode = b.HttpCode
diff --git a/BTCPayServer/Views/UIInvoice/Invoice.cshtml b/BTCPayServer/Views/UIInvoice/Invoice.cshtml
index 3186b27..819f68b 100644
--- a/BTCPayServer/Views/UIInvoice/Invoice.cshtml
+++ b/BTCPayServer/Views/UIInvoice/Invoice.cshtml
@@ -14,10 +14,6 @@
#posData table > tbody > tr:first-child > td > h4 {
margin-top: 0 !important;
}
- .creation-time
- {
- display: none;
- }
.invoice-information {
display: flex;
flex-wrap: wrap;
@@ -542,7 +538,7 @@
<span><b text-translate="true">Delay</b>: <span>@StringLocalizer["{0} minutes", @timeDiff.TotalMinutes.ToString("F1")]</span></span>
<br />
<br />
- <span text-translate="true">A delay indicates that your service either fail to process previous deliveries, or is taking too long.</span>
+ <span text-translate="true">A delay means your service either failed to process earlier deliveries or is taking too long to respond.</span>
}
</div>
</template>
diff --git a/BTCPayServer/wwwroot/swagger/v1/swagger.template.webhooks.json b/BTCPayServer/wwwroot/swagger/v1/swagger.template.webhooks.json
index ec18796..e1cef80 100644
--- a/BTCPayServer/wwwroot/swagger/v1/swagger.template.webhooks.json
+++ b/BTCPayServer/wwwroot/swagger/v1/swagger.template.webhooks.json
@@ -433,7 +433,17 @@
"timestamp": {
"type": "number",
"nullable": false,
- "description": "Timestamp of when the delivery got broadcasted",
+ "description": "Timestamp of when the delivery should have been broadcasted",
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/UnixTimestamp"
+ }
+ ]
+ },
+ "deliveryTime": {
+ "type": "number",
+ "nullable": false,
+ "description": "Timestamp of when the delivery has actually been broadcasted. A delay with `timestamp` means your service either failed to process earlier deliveries or is taking too long to respond.",
"allOf": [
{
"$ref": "#/components/schemas/UnixTimestamp"
Why this scored 18/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.