import type { PublicPaymentSession } from "@voyant-travel/finance/public-validation"; import { type ReactNode } from "react"; /** * Universal landing page rendered at `/pay/:sessionId`. The customer lands * here from a payment-link email (or after returning from the processor's * hosted checkout). Vertical-agnostic — same component for a flight order, * a hotel deposit, or a cruise balance. * * The parent owns: * - fetching `PublicPaymentSession` from `/v1/public/payment-sessions/:id` * (typically via `usePublicPaymentSession` from `@voyant-travel/finance-react`) * - re-fetching after the user returns from the processor (the processor * redirects back to `session.returnUrl`; the page re-mounts and the * latest status is shown) * - sourcing the bank-transfer block from template config * * See `docs/architecture/payments-architecture.md` §Core Rule 4. */ export interface PaymentLinkLandingPageProps { session: PublicPaymentSession; /** Bank-transfer instructions block — template-supplied per deployment. */ bankTransferInstructions?: BankTransferInstructions; /** Header slot (logo, brand name, optional support contact). */ brandHeader?: ReactNode; /** Footer slot (T&Cs link, support contact, privacy). */ brandFooter?: ReactNode; /** * Fired when the customer clicks "Pay by card" — the parent typically * redirects to `session.redirectUrl` (the processor's hosted checkout). */ onPayByCard?: () => void; /** * Optional human-readable description shown above the amount. Sourced * from the booking / invoice / vertical context (the session record * itself doesn't carry a description today). */ description?: string; /** * Optional structured summary slot rendered above the payment methods. * Templates use this to surface vertical-specific context (itinerary * cards with thumbnails for trips, line items for invoices, etc.). */ summary?: ReactNode; /** * Hide the raw `session.notes` paragraph in the header. Templates set this * when the `summary` slot already conveys the same content in a * structured form (so customers don't see the same data twice). */ suppressNotes?: boolean; /** * Fired when the customer clicks "Try again" on a failed payment. * Should create a fresh `payment_session` (the original one is dead) * and redirect the customer to its landing page. The parent typically * POSTs to `/v1/public/payment-link/:sessionId/retry` and navigates to * `/pay/{newSessionId}` with the result. When omitted, the failed * panel renders no retry CTA at all (clearer than a button that * re-opens the dead processor URL). */ onRetry?: () => Promise | void; } export interface BankTransferInstructions { beneficiaryName: string; iban: string; bic?: string; bankName?: string; /** * Reference the customer must include in their wire so finance can * reconcile the inbound transfer. Defaults to the session's * `externalReference` / `clientReference` / `id` when not supplied. */ reference?: string; /** Free-text notes — surfaced under the IBAN block. */ notes?: string; } export declare function PaymentLinkLandingPage({ session, bankTransferInstructions, brandHeader, brandFooter, onPayByCard, onRetry, description, summary, suppressNotes, }: PaymentLinkLandingPageProps): import("react").JSX.Element;