Orders are created in Supabase first. Card payment is then securely processed through Square, and inventory is reduced only after payment succeeds.