diff --git a/.gitignore b/.gitignore
index 49a157f..e2e77ee 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,3 +13,4 @@ backups/
wallets/
qr/
docker-compose.override.yml
+ui/tsconfig.tsbuildinfo
diff --git a/ui/app/i/[invoiceId]/page.tsx b/ui/app/i/[invoiceId]/page.tsx
index 00b7226..4f7e4d4 100644
--- a/ui/app/i/[invoiceId]/page.tsx
+++ b/ui/app/i/[invoiceId]/page.tsx
@@ -1,6 +1,7 @@
import type { Metadata } from "next";
import BtcpayModalBridge from "../../../components/btcpay-modal-bridge";
+import BtcpayAutoReturn from "../../../components/btcpay-auto-return";
import BtcpayClassicCheckout from "../../../components/btcpay-classic-checkout";
import InvoicePaymentDetails from "../../../components/invoice-payment-details";
import InvoiceStatusAutoRefresh from "../../../components/invoice-status-auto-refresh";
@@ -210,7 +211,13 @@ export default async function BtcpayModalInvoicePage({
const isBtcpayInvoice = Boolean(invoice.btcpay_amount && invoice.btcpay_currency);
const useClassicCheckout =
isBtcpayInvoice && invoice.btcpay_checkout_style === "btcpay_classic";
- const shouldShowBtcpayActions = isBtcpayInvoice && invoice.status === "confirmed";
+ // The merchant's own order page is where a customer belongs once the payment has been seen, so
+ // the way back appears at detection. The receipt still waits for the confirmation target, because
+ // that is the point at which there is a settled payment to write one about.
+ const btcpayPaymentSeen =
+ isBtcpayInvoice &&
+ (invoice.status === "payment_detected" || invoice.status === "confirmed");
+ const shouldShowBtcpayActions = btcpayPaymentSeen;
const checkoutContinueAvailable =
!isBtcpayInvoice &&
invoice.status === "confirmed" &&
@@ -371,6 +378,11 @@ export default async function BtcpayModalInvoicePage({
) : null}
+
Payment request