import { cookies } from "next/headers"; import { redirect } from "next/navigation"; export default async function ConnectXeroPage() { const cookieStore = await cookies(); const session = cookieStore.get("session"); if (!session) { redirect("/login"); } return (
{/* Navigation */}
{/* Header */}
Step 3 of 3

Connect Xero

We need access to your Xero organisation to automatically create invoices and mark them as paid when Stripe payments succeed.

{/* Two Column Layout */}
{/* Left Column - Information */}
{/* What we do */}

What we can create

  • Invoices

    Sales invoices matched to Stripe payments

  • Credit notes

    For Stripe refunds and chargebacks

  • Journal entries

    For Stripe fees and reconciliation

{/* Important notes */}

Important notes

  • We only create invoices; we never modify or delete them
  • All invoices are created as draft and marked as paid automatically
  • VAT is handled correctly based on your Stripe data
{/* How it works */}

What happens next

  1. 1 You'll be securely redirected to Xero
  2. 2 Select which organisation to connect
  3. 3 Your dashboard will be ready to configure
{/* Right Column - CTA Card */}

Almost there!

Connect Xero →

You'll be redirected to Xero's secure OAuth page

{/* Trust badges */}

🔒 Your security matters: We use OAuth, so you can revoke access from Xero at any time. We never see or store your Xero password.

); }