---
title: Checkout - Agentic Engineering the Hard Way
---

# Redirecting to payment...

<script setup>
import { onMounted } from 'vue'
import { useData, useRouter } from 'vitepress'

const { site } = useData()
const router = useRouter()

const PRICES = {
  'self-paced': { price_id: 'price_1TeZdgQGFaSjzUrJE4aoSlPb', name: 'Self-Paced', amount: 9700 },
  'enterprise': { price_id: 'price_1TeZdhQGFaSjzUrJxVhrpvQj', name: 'Enterprise', amount: 19900 },
  'cohort': { price_id: 'price_1TeZdiQGFaSjzUrJpoX01VPn', name: 'Cohort', amount: 24700 },
}

onMounted(async () => {
  const params = new URLSearchParams(window.location.search)
  const plan = params.get('plan') || 'self-paced'
  const email = params.get('email') || ''

  const price = PRICES[plan]
  if (!price) {
    document.getElementById('status').textContent = 'Invalid plan selected.'
    return
  }

  document.getElementById('status').textContent = `Creating checkout session for ${price.name}...`

  try {
    // Try domain URL first, fall back to direct IP
    const apiUrl = 'https://git.fdsa.agency/api'
    const resp = await fetch(apiUrl, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        price_id: price.price_id,
        mode: 'payment',
        customer_email: email || undefined,
      }),
    })

    const data = await resp.json()

    if (data.url) {
      window.location.href = data.url
    } else {
      document.getElementById('status').textContent =
        'Checkout is not yet configured. Please use the Gumroad links on the pricing page.'
      document.getElementById('fallback').style.display = 'block'
    }
  } catch (e) {
    document.getElementById('status').textContent =
      'Payment system is being set up. Use the Gumroad links below.'
    document.getElementById('fallback').style.display = 'block'
  }
})
</script>

<div id="status" style="text-align:center;padding:40px;color:var(--vp-c-text-2)">
  Initializing checkout...
</div>

<div id="fallback" style="display:none;text-align:center;padding:20px">
  <p style="margin-bottom:20px">You can also purchase directly via Gumroad:</p>
  <p>
    <a href="https://gumroad.com/l/fdsa-agentic-selfpaced" class="btn-p btn-primary" style="display:inline-block;padding:12px 24px;margin:4px">Self-Paced — $97</a>
    <a href="https://gumroad.com/l/fdsa-agentic-enterprise" class="btn-p btn-ghost" style="display:inline-block;padding:12px 24px;margin:4px">Enterprise — $199</a>
    <a href="https://gumroad.com/l/fdsa-agentic-cohort" class="btn-p btn-ghost" style="display:inline-block;padding:12px 24px;margin:4px">Cohort — $247</a>
  </p>
  <p style="margin-top:20px;font-size:13px;color:var(--vp-c-text-3)">
    All purchases handled securely by Stripe/Gumroad. 30-day guarantee.
  </p>
</div>
