@using BTCPayServer.Client @model InvoiceDetailsModel @{ ViewData["Title"] = $"Invoice {Model.Id}"; } @section PageHeadContent { } @section PageFootContent { } @if (Model.CanRefund) { }

General Information

@if (!string.IsNullOrEmpty(Model.TypedMetadata.OrderId)) { } @if (Model.TypedMetadata.PaymentRequestId is not null) { } @if (!string.IsNullOrEmpty(Model.NotificationUrl)) { } @if (!string.IsNullOrEmpty(Model.RedirectUrl)) { }
Store @Model.StoreName
Invoice Id @Model.Id
Order Id @if (!string.IsNullOrEmpty(Model.TypedMetadata.OrderUrl)) { @if (string.IsNullOrEmpty(Model.TypedMetadata.OrderId)) { View Order } else { @Model.TypedMetadata.OrderId } } else { @Model.TypedMetadata.OrderId }
Payment Request Id @Model.TypedMetadata.PaymentRequestId
State
Created Date @Model.CreatedDate.ToBrowserDate()
Expiration Date @Model.ExpirationDate.ToBrowserDate()
Monitoring Date @Model.MonitoringDate.ToBrowserDate()
Transaction Speed @Model.TransactionSpeed
Total Amount Due @Model.Fiat
Notification Url @Model.NotificationUrl
Redirect Url @Model.RedirectUrl
@if (!string.IsNullOrEmpty(Model.TypedMetadata.ItemCode) || !string.IsNullOrEmpty(Model.TypedMetadata.ItemDesc) || Model.TypedMetadata.TaxIncluded is not null) {

Product Information

@if (!string.IsNullOrEmpty(Model.TypedMetadata.ItemCode)) { } @if (!string.IsNullOrEmpty(Model.TypedMetadata.ItemDesc)) { } @if (Model.TaxIncluded is not null) { }
Item code @Model.TypedMetadata.ItemCode
Item Description @Model.TypedMetadata.ItemDesc
Tax Included @Model.TaxIncluded
} @if (Model.TypedMetadata.BuyerName is not null || Model.TypedMetadata.BuyerEmail is not null || Model.TypedMetadata.BuyerPhone is not null || Model.TypedMetadata.BuyerAddress1 is not null || Model.TypedMetadata.BuyerAddress2 is not null || Model.TypedMetadata.BuyerCity is not null || Model.TypedMetadata.BuyerState is not null || Model.TypedMetadata.BuyerCountry is not null || Model.TypedMetadata.BuyerZip is not null) {

Buyer Information

@if (Model.TypedMetadata.BuyerName is not null) { } @if (Model.TypedMetadata.BuyerEmail is not null) { } @if (Model.TypedMetadata.BuyerPhone is not null) { } @if (Model.TypedMetadata.BuyerAddress1 is not null) { } @if (Model.TypedMetadata.BuyerAddress2 is not null) { } @if (Model.TypedMetadata.BuyerCity is not null) { } @if (Model.TypedMetadata.BuyerState is not null) { } @if (Model.TypedMetadata.BuyerCountry is not null) { } @if (Model.TypedMetadata.BuyerZip is not null) { }
Name @Model.TypedMetadata.BuyerName
Email @Model.TypedMetadata.BuyerEmail
Phone @Model.TypedMetadata.BuyerPhone
Address 1 @Model.TypedMetadata.BuyerAddress1
Address 2 @Model.TypedMetadata.BuyerAddress2
City @Model.TypedMetadata.BuyerCity
State @Model.TypedMetadata.BuyerState
Country @Model.TypedMetadata.BuyerCountry
Zip @Model.TypedMetadata.BuyerZip
} @if (Model.ReceiptData?.Any() is true) {

Receipt Information

} @if (Model.AdditionalData?.Any() is true) {

Additional Information

}

Invoice Summary

@if (Model.Deliveries.Any()) {

Webhooks

@foreach (var delivery in Model.Deliveries) { }
Status ID Type Url Date Action
@if (delivery.Success) { } else { } @if (!delivery.Pruned) { @delivery.Id } @delivery.Type @delivery.PayloadUrl @delivery.Time.ToBrowserDate() @if (!delivery.Pruned) { }
} @if ((Model.Refunds?.Count ?? 0) > 0) {

Refunds

@foreach (var refund in Model.Refunds) { var blob = refund.PullPaymentData.GetBlob(); }
Pull Payment Amount Date
@refund.PullPaymentData.Id @blob.Limit @blob.Currency @refund.PullPaymentData.StartDate.ToBrowserDate()
} @if (Model.Events is { Length: > 0 }) {

Events

@foreach (var evt in Model.Events) { var cssClass = string.IsNullOrEmpty(evt.GetCssClass()) ? null : $"text-{evt.GetCssClass()}"; }
Date Message
@evt.Timestamp.ToBrowserDate("o", "short", "medium") @evt.Message
}